@basemaps/cli-config 8.0.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/LICENSE +21 -0
- package/README.md +35 -0
- package/build/__tests__/util.test.d.ts +1 -0
- package/build/__tests__/util.test.js +15 -0
- package/build/__tests__/util.test.js.map +1 -0
- package/build/bin.d.ts +1 -0
- package/build/bin.js +11 -0
- package/build/bin.js.map +1 -0
- package/build/cli/action.bundle.assets.d.ts +17 -0
- package/build/cli/action.bundle.assets.js +97 -0
- package/build/cli/action.bundle.assets.js.map +1 -0
- package/build/cli/action.bundle.d.ts +21 -0
- package/build/cli/action.bundle.js +58 -0
- package/build/cli/action.bundle.js.map +1 -0
- package/build/cli/action.create.config.d.ts +19 -0
- package/build/cli/action.create.config.js +79 -0
- package/build/cli/action.create.config.js.map +1 -0
- package/build/cli/action.import.d.ts +19 -0
- package/build/cli/action.import.js +335 -0
- package/build/cli/action.import.js.map +1 -0
- package/build/cli/config.diff.d.ts +27 -0
- package/build/cli/config.diff.js +146 -0
- package/build/cli/config.diff.js.map +1 -0
- package/build/cli/config.update.d.ts +24 -0
- package/build/cli/config.update.js +115 -0
- package/build/cli/config.update.js.map +1 -0
- package/build/index.d.ts +105 -0
- package/build/index.js +15 -0
- package/build/index.js.map +1 -0
- package/build/util.d.ts +23 -0
- package/build/util.js +136 -0
- package/build/util.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Crown copyright (c), Toitū Te Whenua Land Information New Zealand on behalf of the New Zealand Government.
|
|
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
|
|
18
|
+
THE 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
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @basemaps/cli-config
|
|
2
|
+
|
|
3
|
+
CLI for Basemap config
|
|
4
|
+
|
|
5
|
+
## Usage -- Bundle
|
|
6
|
+
|
|
7
|
+
Bundle config files into config bundle json from a given config path. This is mainly use for [linz/basemaps-config](https://github.com/linz/basemaps-config) CICD process to bundle all the individual config json files into a single JSON bundle.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
./build/bin.js bundle --config config/ --assets assets/asset.tar --output config.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage -- Bundle Assets
|
|
14
|
+
|
|
15
|
+
Create cotar file for the config assets. Creates a cotar file from a directory. This is mainly use for [linz/basemaps-config](https://github.com/linz/basemaps-config) CICD process to create cotar file.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
./build/bin.js bundle-assets --assets assets/ --output output/
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage -- Import
|
|
22
|
+
|
|
23
|
+
Import all configs from a bundled config.json into dynamo db from a given config path. This is mainly use for [linz/basemaps-config](https://github.com/linz/basemaps-config) repository ci/cd process to deploy the config changes into DynamoDB.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
./build/bin.js import --config config.json --commit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage -- Create Config
|
|
30
|
+
|
|
31
|
+
Create a Basemaps configuration from a path to imagery. This is mainly use for [linz/basemaps-config](https://github.com/linz/basemaps-config) repository ci/cd process to deploy the config changes into DynamoDB.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
./build/bin.js create-config --path path/ --target target/
|
|
35
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import assert from 'node:assert';
|
|
2
|
+
import { describe, it } from 'node:test';
|
|
3
|
+
import { nameImageryTitle } from '../util.js';
|
|
4
|
+
describe('util', () => {
|
|
5
|
+
it('nameImageryTitle', () => {
|
|
6
|
+
assert.equal(nameImageryTitle('Palmerston-north urban 2016-17 12.125m'), 'palmerston-north_urban_2016-17_12-125m');
|
|
7
|
+
assert.equal(nameImageryTitle('Palmerston-north urban 2016-17 12-125'), 'palmerston-north_urban_2016-17_12-125');
|
|
8
|
+
assert.equal(nameImageryTitle('Palmerston-north / urban 2016-17 12.125'), 'palmerston-north_urban_2016-17_12-125');
|
|
9
|
+
assert.equal(nameImageryTitle('Palmerston.north / urban 2016-17 12.125'), 'palmerston-north_urban_2016-17_12-125');
|
|
10
|
+
assert.equal(nameImageryTitle('Manawatū urban 2016-17 12.125m'), 'manawatu_urban_2016-17_12-125m');
|
|
11
|
+
assert.equal(nameImageryTitle('ĀāĒēĪīŌōŪū urban 2016-17 12.125m'), 'aaeeiioouu_urban_2016-17_12-125m');
|
|
12
|
+
assert.equal(nameImageryTitle('Marlborough / Wellington 0.75m SNC50451 (2004-2005)'), 'marlborough_wellington_0-75m_snc50451_2004-2005');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=util.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.test.js","sourceRoot":"","sources":["../../src/__tests__/util.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC1B,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,wCAAwC,CAAC,EAAE,wCAAwC,CAAC,CAAC;QACnH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,uCAAuC,CAAC,EAAE,uCAAuC,CAAC,CAAC;QACjH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,yCAAyC,CAAC,EAAE,uCAAuC,CAAC,CAAC;QACnH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,yCAAyC,CAAC,EAAE,uCAAuC,CAAC,CAAC;QACnH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,gCAAgC,CAAC,EAAE,gCAAgC,CAAC,CAAC;QACnG,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,EAAE,kCAAkC,CAAC,CAAC;QACvG,MAAM,CAAC,KAAK,CACV,gBAAgB,CAAC,qDAAqD,CAAC,EACvE,iDAAiD,CAClD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/build/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/bin.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Error.stackTraceLimit = 100;
|
|
2
|
+
import { LogConfig } from '@basemaps/shared';
|
|
3
|
+
import { run } from 'cmd-ts';
|
|
4
|
+
import { ConfigCli } from './index.js';
|
|
5
|
+
run(ConfigCli, process.argv.slice(2)).catch((err) => {
|
|
6
|
+
const logger = LogConfig.get();
|
|
7
|
+
logger.fatal({ err }, 'Command:Failed');
|
|
8
|
+
// Give the logger some time to flush before exiting
|
|
9
|
+
setTimeout(() => process.exit(1), 25);
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=bin.js.map
|
package/build/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAAA,KAAK,CAAC,eAAe,GAAG,GAAG,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IAClD,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IAC/B,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAExC,oDAAoD;IACpD,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
export declare function hashFile(stream: Readable): Promise<string>;
|
|
3
|
+
export declare const BundleAssetsCommand: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
4
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
5
|
+
assets: string;
|
|
6
|
+
output: string;
|
|
7
|
+
verbose: boolean;
|
|
8
|
+
extraVerbose: boolean;
|
|
9
|
+
}>>;
|
|
10
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
11
|
+
assets: string;
|
|
12
|
+
output: string;
|
|
13
|
+
verbose: boolean;
|
|
14
|
+
extraVerbose: boolean;
|
|
15
|
+
}, Promise<void>> & {
|
|
16
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
17
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { base58 } from '@basemaps/config';
|
|
2
|
+
import { fsa, getLogger, logArguments, SourceMemory } from '@basemaps/shared';
|
|
3
|
+
import { CliInfo } from '@basemaps/shared/build/cli/info.js';
|
|
4
|
+
import { CotarIndexBuilder, TarReader } from '@cotar/builder';
|
|
5
|
+
import { CotarIndex } from '@cotar/core';
|
|
6
|
+
import { TarBuilder } from '@cotar/tar';
|
|
7
|
+
import { Metrics } from '@linzjs/metrics';
|
|
8
|
+
import { command, option, string } from 'cmd-ts';
|
|
9
|
+
import { createHash } from 'crypto';
|
|
10
|
+
import { createReadStream, promises as fs } from 'fs';
|
|
11
|
+
const Packing = 25; // Packing factor for the hash map
|
|
12
|
+
const MaxSearch = 50; // Max search factor
|
|
13
|
+
export async function hashFile(stream) {
|
|
14
|
+
return new Promise((resolve, reject) => {
|
|
15
|
+
const hash = createHash('sha256');
|
|
16
|
+
stream.on('data', (chunk) => hash.update(chunk));
|
|
17
|
+
stream.on('end', () => resolve(base58.encode(hash.digest())));
|
|
18
|
+
stream.on('error', (err) => reject(err));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export const BundleAssetsCommand = command({
|
|
22
|
+
name: 'bundle-assets',
|
|
23
|
+
version: CliInfo.version,
|
|
24
|
+
description: 'Cli tool to create cotar file for the config assets. Creates a cotar file from a directory.',
|
|
25
|
+
args: {
|
|
26
|
+
...logArguments,
|
|
27
|
+
assets: option({
|
|
28
|
+
type: string,
|
|
29
|
+
long: 'assets',
|
|
30
|
+
description: 'Paths to the input assets files, must contain assets/sprites/ and assets/fonts.',
|
|
31
|
+
}),
|
|
32
|
+
output: option({
|
|
33
|
+
type: string,
|
|
34
|
+
long: 'output',
|
|
35
|
+
description: 'Paths of the output co tar file.',
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
async handler(args) {
|
|
39
|
+
const metrics = new Metrics();
|
|
40
|
+
const logger = getLogger(this, args, 'cli-config');
|
|
41
|
+
if (!args.output.endsWith('.tar.co'))
|
|
42
|
+
throw new Error(`Invalid output, needs to be .tar.co :"${args.output}"`);
|
|
43
|
+
metrics.start('assets:bundle');
|
|
44
|
+
logger.info({ input: args.assets }, 'BundleAssets:Start');
|
|
45
|
+
const tarFile = await buildTar(fsa.toUrl(args.assets), args.output, logger);
|
|
46
|
+
const cotarFile = await buildTarCo(tarFile, args.output, logger);
|
|
47
|
+
const cotarHash = await hashFile(createReadStream(cotarFile));
|
|
48
|
+
await fs.rename(cotarFile, cotarFile.replace('.tar.co', `-${cotarHash}.tar.co`));
|
|
49
|
+
logger.info({ output: cotarFile, hash: cotarHash }, 'BundleAssets:Finish');
|
|
50
|
+
metrics.end('assets:bundle');
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
async function buildTar(input, output, logger) {
|
|
54
|
+
const startTime = Date.now();
|
|
55
|
+
const outputTar = output.split('.co')[0];
|
|
56
|
+
const tarBuilder = new TarBuilder(outputTar);
|
|
57
|
+
const files = await fsa.toArray(fsa.list(input));
|
|
58
|
+
// Ensure files are put into the same order
|
|
59
|
+
files.sort((a, b) => a.href.localeCompare(b.href));
|
|
60
|
+
logger.info({ output: outputTar, files: files.length }, 'Tar:Create');
|
|
61
|
+
for (const file of files) {
|
|
62
|
+
const filePath = file.href.replace(input.href, '');
|
|
63
|
+
if (filePath.startsWith('/'))
|
|
64
|
+
filePath.slice(1); // Remove the leading '/'
|
|
65
|
+
await tarBuilder.write(decodeURI(filePath), await fsa.read(file));
|
|
66
|
+
}
|
|
67
|
+
await tarBuilder.close();
|
|
68
|
+
logger.info({ output: outputTar, stats: tarBuilder.stats, duration: Date.now() - startTime }, 'Tar:Create:Done');
|
|
69
|
+
return outputTar;
|
|
70
|
+
}
|
|
71
|
+
async function buildTarCo(input, output, logger) {
|
|
72
|
+
logger.info({ output }, 'Cotar:Create');
|
|
73
|
+
const indexFile = input + '.index';
|
|
74
|
+
const startTime = Date.now();
|
|
75
|
+
const buf = await toTarIndex(input, indexFile, logger);
|
|
76
|
+
logger.info({ output }, 'Cotar:Create:WriteTar');
|
|
77
|
+
await fs.copyFile(input, output);
|
|
78
|
+
await fs.appendFile(output, buf);
|
|
79
|
+
const duration = Date.now() - startTime;
|
|
80
|
+
logger.info({ output, duration }, 'Cotar:Created');
|
|
81
|
+
return output;
|
|
82
|
+
}
|
|
83
|
+
async function toTarIndex(filename, indexFileName, logger) {
|
|
84
|
+
const fd = await fs.open(filename, 'r');
|
|
85
|
+
logger.info({ index: indexFileName }, 'Cotar.Index:Start');
|
|
86
|
+
const startTime = Date.now();
|
|
87
|
+
const { buffer, count } = await CotarIndexBuilder.create(fd, {
|
|
88
|
+
packingFactor: 1 + Packing / 100,
|
|
89
|
+
maxSearch: MaxSearch,
|
|
90
|
+
});
|
|
91
|
+
logger.info({ count, size: buffer.length, duration: Date.now() - startTime }, 'Cotar.Index:Created');
|
|
92
|
+
const index = await CotarIndex.create(new SourceMemory('index', buffer));
|
|
93
|
+
await TarReader.validate(fd, index);
|
|
94
|
+
await fd.close();
|
|
95
|
+
return buffer;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=action.bundle.assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.bundle.assets.js","sourceRoot":"","sources":["../../src/cli/action.bundle.assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAW,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAc,UAAU,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AAGtD,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,kCAAkC;AACtD,MAAM,SAAS,GAAG,EAAE,CAAC,CAAC,oBAAoB;AAE1C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAAgB;IAC7C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAiB,EAAE,EAAE,CA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G,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IACxC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,eAAe,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,QAAgB,EAAE,aAAqB,EAAE,MAAe;IAChF,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACxC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,mBAAmB,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,iBAAiB,CAAC,MAAM,CAAC,EAAE,EAAE;QAC3D,aAAa,EAAE,CAAC,GAAG,OAAO,GAAG,GAAG;QAChC,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,EAAE,qBAAqB,CAAC,CAAC;IACrG,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACzE,MAAM,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACjB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const DefaultConfig = "config/";
|
|
2
|
+
export declare const DefaultOutput = "config/config.json";
|
|
3
|
+
export declare const BundleCommand: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
4
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
5
|
+
config: string;
|
|
6
|
+
output: string;
|
|
7
|
+
assets: string | undefined;
|
|
8
|
+
cache: string | undefined;
|
|
9
|
+
verbose: boolean;
|
|
10
|
+
extraVerbose: boolean;
|
|
11
|
+
}>>;
|
|
12
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
13
|
+
config: string;
|
|
14
|
+
output: string;
|
|
15
|
+
assets: string | undefined;
|
|
16
|
+
cache: string | undefined;
|
|
17
|
+
verbose: boolean;
|
|
18
|
+
extraVerbose: boolean;
|
|
19
|
+
}, Promise<void>> & {
|
|
20
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
21
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ConfigJson } from '@basemaps/config-loader';
|
|
2
|
+
import { fsa, getLogger, logArguments } from '@basemaps/shared';
|
|
3
|
+
import { CliInfo } from '@basemaps/shared/build/cli/info.js';
|
|
4
|
+
import { Metrics } from '@linzjs/metrics';
|
|
5
|
+
import { command, option, optional, string } from 'cmd-ts';
|
|
6
|
+
import pLimit from 'p-limit';
|
|
7
|
+
export const DefaultConfig = 'config/';
|
|
8
|
+
export const DefaultOutput = 'config/config.json';
|
|
9
|
+
export const BundleCommand = command({
|
|
10
|
+
name: 'bundle',
|
|
11
|
+
version: CliInfo.version,
|
|
12
|
+
description: 'Given a path of config files and bundle them into one config json. Bundles a config json from config files.',
|
|
13
|
+
args: {
|
|
14
|
+
...logArguments,
|
|
15
|
+
config: option({
|
|
16
|
+
type: string,
|
|
17
|
+
long: 'config',
|
|
18
|
+
description: 'Path of config files.',
|
|
19
|
+
defaultValue: () => DefaultConfig,
|
|
20
|
+
defaultValueIsSerializable: true,
|
|
21
|
+
}),
|
|
22
|
+
output: option({
|
|
23
|
+
type: string,
|
|
24
|
+
long: 'output',
|
|
25
|
+
description: 'Output of the bundle file.',
|
|
26
|
+
defaultValue: () => DefaultOutput,
|
|
27
|
+
defaultValueIsSerializable: true,
|
|
28
|
+
}),
|
|
29
|
+
assets: option({
|
|
30
|
+
type: optional(string),
|
|
31
|
+
long: 'assets',
|
|
32
|
+
description: 'Add assets location into the config bundle file.',
|
|
33
|
+
}),
|
|
34
|
+
cache: option({
|
|
35
|
+
type: optional(string),
|
|
36
|
+
long: 'cache',
|
|
37
|
+
description: 'Location of the config cache to reduce number of requests needed to source file.',
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
async handler(args) {
|
|
41
|
+
const metrics = new Metrics();
|
|
42
|
+
const logger = getLogger(this, args, 'cli-config');
|
|
43
|
+
const configUrl = fsa.toUrl(args.config);
|
|
44
|
+
const outputUrl = fsa.toUrl(args.output);
|
|
45
|
+
const cacheLocation = args.cache ? fsa.toUrl(args.cache) : undefined;
|
|
46
|
+
metrics.start('config:bundle');
|
|
47
|
+
logger.info({ configUrl }, 'BundleConfig:Start');
|
|
48
|
+
const q = pLimit(25);
|
|
49
|
+
const mem = await ConfigJson.fromUrl(configUrl, q, logger, cacheLocation);
|
|
50
|
+
if (args.assets != null)
|
|
51
|
+
mem.assets = args.assets;
|
|
52
|
+
const configJson = mem.toJson();
|
|
53
|
+
await fsa.write(outputUrl, JSON.stringify(configJson));
|
|
54
|
+
logger.info({ outputUrl }, 'BundleConfig:Finish');
|
|
55
|
+
metrics.end('config:bundle');
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=action.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.bundle.js","sourceRoot":"","sources":["../../src/cli/action.bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,MAAM,MAAM,SAAS,CAAC;AAE7B,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AACvC,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;IACnC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,WAAW,EACT,6GAA6G;IAC/G,IAAI,EAAE;QACJ,GAAG,YAAY;QACf,MAAM,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uBAAuB;YACpC,YAAY,EAAE,GAAG,EAAE,CAAC,aAAa;YACjC,0BAA0B,EAAE,IAAI;SACjC,CAAC;QACF,MAAM,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4BAA4B;YACzC,YAAY,EAAE,GAAG,EAAE,CAAC,aAAa;YACjC,0BAA0B,EAAE,IAAI;SACjC,CAAC;QACF,MAAM,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,QAAQ,CAA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,CAAC,EAAE,SAAS,EAAE,EAAE,qBAAqB,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const CreateConfigCommand: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
2
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
3
|
+
target: URL | undefined;
|
|
4
|
+
concurrency: number;
|
|
5
|
+
host: URL | undefined;
|
|
6
|
+
path: URL;
|
|
7
|
+
verbose: boolean;
|
|
8
|
+
extraVerbose: boolean;
|
|
9
|
+
}>>;
|
|
10
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
11
|
+
target: URL | undefined;
|
|
12
|
+
concurrency: number;
|
|
13
|
+
host: URL | undefined;
|
|
14
|
+
path: URL;
|
|
15
|
+
verbose: boolean;
|
|
16
|
+
extraVerbose: boolean;
|
|
17
|
+
}, Promise<void>> & {
|
|
18
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
19
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { base58, ConfigProviderMemory } from '@basemaps/config';
|
|
2
|
+
import { initImageryFromTiffUrl } from '@basemaps/config-loader';
|
|
3
|
+
import { getLogger, isArgo, logArguments, Url, UrlFolder } from '@basemaps/shared';
|
|
4
|
+
import { fsa, getPreviewUrl, urlToString } from '@basemaps/shared';
|
|
5
|
+
import { CliInfo } from '@basemaps/shared/build/cli/info.js';
|
|
6
|
+
import { Metrics } from '@linzjs/metrics';
|
|
7
|
+
import { command, number, option, optional, positional } from 'cmd-ts';
|
|
8
|
+
import pLimit from 'p-limit';
|
|
9
|
+
import { promisify } from 'util';
|
|
10
|
+
import { gzip } from 'zlib';
|
|
11
|
+
const gzipPromise = promisify(gzip);
|
|
12
|
+
export const CreateConfigCommand = command({
|
|
13
|
+
name: 'create-config',
|
|
14
|
+
version: CliInfo.version,
|
|
15
|
+
description: 'Create a Basemaps configuration from a path to imagery',
|
|
16
|
+
args: {
|
|
17
|
+
...logArguments,
|
|
18
|
+
target: option({
|
|
19
|
+
type: optional(UrlFolder),
|
|
20
|
+
long: 'target',
|
|
21
|
+
description: 'Where to write the config json, Defaults to imagery path',
|
|
22
|
+
}),
|
|
23
|
+
concurrency: option({
|
|
24
|
+
type: number,
|
|
25
|
+
long: 'concurrency',
|
|
26
|
+
description: 'How many COGs to initialise at once',
|
|
27
|
+
defaultValue: () => 25,
|
|
28
|
+
defaultValueIsSerializable: true,
|
|
29
|
+
}),
|
|
30
|
+
host: option({
|
|
31
|
+
type: optional(Url),
|
|
32
|
+
long: 'host',
|
|
33
|
+
description: 'Which host to use as the base for for preview generation links',
|
|
34
|
+
defaultValue: () => new URL('https://basemaps.linz.govt.nz'),
|
|
35
|
+
defaultValueIsSerializable: true,
|
|
36
|
+
}),
|
|
37
|
+
path: positional({ type: UrlFolder, displayName: 'path', description: 'Path to imagery' }),
|
|
38
|
+
},
|
|
39
|
+
async handler(args) {
|
|
40
|
+
const metrics = new Metrics();
|
|
41
|
+
const logger = getLogger(this, args, 'cli-config');
|
|
42
|
+
const provider = new ConfigProviderMemory();
|
|
43
|
+
const q = pLimit(args.concurrency);
|
|
44
|
+
metrics.start('imagery:load');
|
|
45
|
+
const im = await initImageryFromTiffUrl(args.path, q, undefined, logger);
|
|
46
|
+
const ts = ConfigProviderMemory.imageryToTileSet(im);
|
|
47
|
+
provider.put(im);
|
|
48
|
+
metrics.end('imagery:load');
|
|
49
|
+
logger.info({ files: im.files.length, titles: im.title }, 'ImageryConfig:Loaded');
|
|
50
|
+
const config = provider.toJson();
|
|
51
|
+
const outputPath = new URL(`basemaps-config-${config.hash}.json.gz`, args.target ?? args.path);
|
|
52
|
+
logger.info({ output: outputPath, hash: config.hash }, 'ImageryConfig:Write');
|
|
53
|
+
await fsa.write(outputPath, await gzipPromise(JSON.stringify(config)));
|
|
54
|
+
const configPath = base58.encode(Buffer.from(outputPath.href));
|
|
55
|
+
// previews default to webp, so find the first output that supports web to make our life easier
|
|
56
|
+
const output = ts.outputs?.find((f) => f.format == null || f.format.includes('webp'));
|
|
57
|
+
const p = getPreviewUrl({ imagery: im, config: configPath, pipeline: output?.name });
|
|
58
|
+
const url = new URL(`/${p.slug}?style=${p.name}&tileMatrix=${im.tileMatrix}&debug&config=${configPath}`, args.host);
|
|
59
|
+
const urlPreview = new URL(p.url, args.host);
|
|
60
|
+
logger.info({
|
|
61
|
+
imageryId: im.id,
|
|
62
|
+
configUrl: outputPath,
|
|
63
|
+
url,
|
|
64
|
+
urlPreview,
|
|
65
|
+
config: configPath,
|
|
66
|
+
title: im.title,
|
|
67
|
+
tileMatrix: im.tileMatrix,
|
|
68
|
+
projection: im.projection,
|
|
69
|
+
}, 'ImageryConfig:Done');
|
|
70
|
+
if (isArgo()) {
|
|
71
|
+
// Path to where the config is located
|
|
72
|
+
await fsa.write(fsa.toUrl('/tmp/cogify/config-path'), urlToString(outputPath));
|
|
73
|
+
// A URL to where the imagery can be viewed
|
|
74
|
+
await fsa.write(fsa.toUrl('/tmp/cogify/config-url'), urlToString(url));
|
|
75
|
+
}
|
|
76
|
+
logger.info({ metrics: metrics.metrics }, 'ImageryConfig:Metrics');
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=action.create.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.create.config.js","sourceRoot":"","sources":["../../src/cli/action.create.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAuB,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAEpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACzC,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,WAAW,EAAE,wDAAwD;IACrE,IAAI,EAAE;QACJ,GAAG,YAAY;QACf,MAAM,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC;YACzB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,0DAA0D;SACxE,CAAC;QACF,WAAW,EAAE,MAAM,CAAC;YAClB,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,qCAAqC;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YACV,MAAM,EAAE,UAAU;YAClB,KAAK,EAAE,EAAE,CAAC,KAAK;YACf,UAAU,EAAE,EAAE,CAAC,UAAU;YACzB,UAAU,EAAE,EAAE,CAAC,UAAU;SAC1B,EACD,oBAAoB,CACrB,CAAC;QAEF,IAAI,MAAM,EAAE,EAAE,CAAC;YACb,sCAAsC;YACtC,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;YAC/E,2CAA2C;YAC3C,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACzE,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,uBAAuB,CAAC,CAAC;IACrE,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const ImportCommand: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
2
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
3
|
+
config: string;
|
|
4
|
+
output: string;
|
|
5
|
+
target: string | undefined;
|
|
6
|
+
commit: boolean;
|
|
7
|
+
verbose: boolean;
|
|
8
|
+
extraVerbose: boolean;
|
|
9
|
+
}>>;
|
|
10
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
11
|
+
config: string;
|
|
12
|
+
output: string;
|
|
13
|
+
target: string | undefined;
|
|
14
|
+
commit: boolean;
|
|
15
|
+
verbose: boolean;
|
|
16
|
+
extraVerbose: boolean;
|
|
17
|
+
}, Promise<void>> & {
|
|
18
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
19
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|