@civ-clone/base-tile-improvement-airbase 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes ADDED
@@ -0,0 +1,2 @@
1
+ **/*.js linguist-generated=true
2
+
@@ -0,0 +1,39 @@
1
+ name: Build and test application on push to remote
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - uses: pnpm/action-setup@v4
11
+ with:
12
+ version: 11
13
+ - uses: actions/setup-node@v4
14
+ with:
15
+ node-version: 22
16
+ # No lock file, so this tests what a consumer resolves. The settings match
17
+ # web-renderer's pnpm-workspace.yaml: several @civ-clone packages depend on
18
+ # each other as `github:` URLs, this project's own releases are often only
19
+ # minutes old, and nothing here needs a dependency's build script.
20
+ - run: >-
21
+ pnpm install --no-frozen-lockfile
22
+ --config.block-exotic-subdeps=false
23
+ --config.minimum-release-age=0
24
+ --config.strict-dep-builds=false
25
+ - run: npm run --if-present prettier:check
26
+ # The tests load the committed `.js`, so compile to prove the source
27
+ # type-checks, and fail if the committed output is stale. `--force`
28
+ # because a fresh checkout's timestamps can make `tsc --build` treat the
29
+ # committed output as up to date and skip the compile entirely.
30
+ - run: npm run --if-present ts:compile -- --force
31
+ - run: npm run --if-present prettier:format
32
+ # Stale *or never committed* output fails: `git diff` alone misses a new
33
+ # module whose `.js` was never added, which the published package would
34
+ # then omit. Only the compiled extensions, so the lock file the install
35
+ # writes cannot fail it; `node_modules` is ignored, so it stays out.
36
+ - run: |
37
+ git status --short --untracked-files=all -- '*.js' '*.d.ts' '*.js.map'
38
+ test -z "$(git status --porcelain --untracked-files=all -- '*.js' '*.d.ts' '*.js.map')"
39
+ - run: npm run --if-present test
package/.prettierrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true
4
+ }
package/Airbase.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import TileImprovement from '@civ-clone/core-tile-improvement/TileImprovement';
2
+ export declare class Airbase extends TileImprovement {}
3
+ export default Airbase;
package/Airbase.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Airbase = void 0;
4
+ const TileImprovement_1 = require("@civ-clone/core-tile-improvement/TileImprovement");
5
+ class Airbase extends TileImprovement_1.default {
6
+ }
7
+ exports.Airbase = Airbase;
8
+ exports.default = Airbase;
9
+ //# sourceMappingURL=Airbase.js.map
package/Airbase.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Airbase.js","sourceRoot":"","sources":["Airbase.ts"],"names":[],"mappings":";;;AAAA,sFAA+E;AAE/E,MAAa,OAAQ,SAAQ,yBAAe;CAAG;AAA/C,0BAA+C;AAE/C,kBAAe,OAAO,CAAC"}
package/Airbase.ts ADDED
@@ -0,0 +1,5 @@
1
+ import TileImprovement from '@civ-clone/core-tile-improvement/TileImprovement';
2
+
3
+ export class Airbase extends TileImprovement {}
4
+
5
+ export default Airbase;
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Dom Hastings
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,19 @@
1
- # Temporary Holding Version
1
+ # base-tile-improvement-airbase
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The `Airbase` tile improvement: an airbase on a square.
4
+
5
+ A tile improvement where a game's rules may let aircraft refuel and land outside a city.
6
+
7
+ For example: Civ2: Airbase.
8
+
9
+ This package only declares the class: it has no `main` and registers nothing, so installing it changes no game.
10
+ A game's rules register it and give it its yields.
11
+
12
+ ```ts
13
+ import Airbase from '@civ-clone/base-tile-improvement-airbase/Airbase';
14
+ import { instance as availableTileImprovementRegistryInstance } from '@civ-clone/core-tile-improvement/AvailableTileImprovementRegistry';
15
+
16
+ availableTileImprovementRegistryInstance.register(Airbase);
17
+ ```
18
+
19
+ Part of the Civ2 work (civ-clone/web-renderer#1008).
package/package.json CHANGED
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "name": "@civ-clone/base-tile-improvement-airbase",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "The Airbase tile improvement class.",
5
+ "repository": "git@github.com:civ-clone/base-tile-improvement-airbase.git",
6
+ "keywords": [
7
+ "typescript",
8
+ "civilization"
9
+ ],
10
+ "author": "dom111 <dom111@users.noreply.github.com>",
11
+ "license": "MIT",
12
+ "private": false,
13
+ "scripts": {
14
+ "build": "npm run ts:compile && npm run prettier:format",
15
+ "prettier:check": "prettier --config .prettierrc --check '**/*.ts'",
16
+ "prettier:format": "prettier --config .prettierrc '**/*.ts' --write",
17
+ "test": "ts-mocha ./tests/*.test.ts",
18
+ "ts:compile": "tsc --build tsconfig.json"
19
+ },
20
+ "devDependencies": {
21
+ "@types/chai": "^4.0.0",
22
+ "@types/mocha": "^8.0.0",
23
+ "@types/node": "^14.18.63",
24
+ "chai": "^4.0.0",
25
+ "mocha": "^9.0.0",
26
+ "prettier": "^2.8.8",
27
+ "ts-mocha": "^9.0.0",
28
+ "typescript": "^4.9.5"
29
+ },
30
+ "dependencies": {
31
+ "@civ-clone/core-tile-improvement": "^0.1.6"
32
+ }
33
+ }
@@ -0,0 +1,9 @@
1
+ import Airbase from '../Airbase';
2
+ import TileImprovement from '@civ-clone/core-tile-improvement/TileImprovement';
3
+ import { expect } from 'chai';
4
+
5
+ describe('Airbase', (): void => {
6
+ it('should be a tile improvement', (): void => {
7
+ expect(Airbase.prototype).to.be.instanceOf(TileImprovement);
8
+ });
9
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "declaration": true,
4
+ "lib": [
5
+ "es2019"
6
+ ],
7
+ "module": "commonjs",
8
+ "sourceMap": true,
9
+ "strict": true,
10
+ "target": "ES2018"
11
+ },
12
+ "exclude": [
13
+ "node_modules",
14
+ "tests/*.test.ts"
15
+ ]
16
+ }