-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a447b02
commit b645c2d
Showing
16 changed files
with
2,366 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier/@typescript-eslint", | ||
"plugin:prettier/recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run-script build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run-script build | ||
- run: "sed -i \"s/\\\"version\\\": \\\"0.0.0\\\",/\\\"version\\\": \\\"${GITHUB_REF/refs\\/tags\\/v/}\\\",/g\" package.json" | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.d.ts | ||
*.js | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "npm", | ||
"type": "shell", | ||
"command": "npm install && npm run-script build", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
catalog/catalog-game/catalog-game-version/catalog-game-version-localization/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export type CatalogGameVersionLocalization = { | ||
/** | ||
* The name of the game as of the version localization. | ||
*/ | ||
readonly gameName: string; | ||
|
||
/** | ||
* The code of the localization the version localization implements. | ||
*/ | ||
readonly localizationCode: string; | ||
|
||
/** | ||
* The second half of the URL for the version localization's WASM file. Must | ||
* refer to an existing WASM file. | ||
*/ | ||
readonly wasmUrlSuffix: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { CatalogGameVersionLocalization } from "./catalog-game-version-localization"; | ||
|
||
export { CatalogGameVersionLocalization } from "./catalog-game-version-localization"; | ||
|
||
/** | ||
* A version of a game within a catalog. | ||
*/ | ||
export type CatalogGameVersion = { | ||
/** | ||
* Invariant identifier for the version. Do not change. | ||
*/ | ||
readonly code: string; | ||
|
||
/** | ||
* The date on which the version was published. | ||
*/ | ||
readonly date: number; | ||
|
||
/** | ||
* The localizations of the game version. Must not be empty. Do not remove | ||
* records on update. | ||
*/ | ||
readonly versionLocalizations: ReadonlyArray<CatalogGameVersionLocalization>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { CatalogGameVersion } from "./catalog-game-version"; | ||
|
||
export { | ||
CatalogGameVersionLocalization, | ||
CatalogGameVersion, | ||
} from "./catalog-game-version"; | ||
|
||
/** | ||
* A game within a catalog. | ||
*/ | ||
export type CatalogGame = { | ||
/** | ||
* The versions of the game. Must not be empty. Do not remove records on | ||
* update. | ||
*/ | ||
readonly versions: ReadonlyArray<CatalogGameVersion>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* A localization of a catalog. | ||
*/ | ||
export type CatalogLocalization = { | ||
/** | ||
* Invariant identifier for the localization. Do not change. | ||
*/ | ||
readonly code: string; | ||
|
||
/** | ||
* The name of the localization, in its own language, for display to the user | ||
* in a menu. | ||
*/ | ||
readonly uiName: string; | ||
|
||
/** | ||
* The second half of the URL for the localization's icon. Must refer to an | ||
* existing PNG or JPEG. | ||
*/ | ||
readonly iconUrlSuffix: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { CatalogGame } from "./catalog-game"; | ||
import { CatalogLocalization } from "./catalog-localization"; | ||
|
||
export { | ||
CatalogGameVersionLocalization, | ||
CatalogGameVersion, | ||
CatalogGame, | ||
} from "./catalog-game"; | ||
|
||
export { CatalogLocalization } from "./catalog-localization"; | ||
|
||
/** | ||
* Describes a catalog of versioned, localized Neomura games. | ||
*/ | ||
export type Catalog = { | ||
/** | ||
* The first half of all URLs in the catalog. | ||
*/ | ||
readonly urlPrefix: string; | ||
|
||
/** | ||
* All localizations supported by games in the catalog. Must not be empty. | ||
* Do not remove records on update. | ||
*/ | ||
readonly localizations: ReadonlyArray<CatalogLocalization>; | ||
|
||
/** | ||
* All games within the catalog. Must not be empty. Do not remove records on | ||
* update. | ||
*/ | ||
readonly games: ReadonlyArray<CatalogGame>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export { | ||
CatalogGameVersionLocalization, | ||
CatalogGameVersion, | ||
CatalogGame, | ||
CatalogLocalization, | ||
Catalog, | ||
} from "./catalog"; |
Oops, something went wrong.