@osdk/cli 0.23.0 → 0.24.0-beta.1
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/CHANGELOG.md +16 -0
- package/build/browser/{chunk-IRSUCKI2.js → chunk-5AQYUXAY.js} +4 -2
- package/build/browser/chunk-5AQYUXAY.js.map +1 -0
- package/build/{cjs/chunk-EMMSS5I5.cjs → browser/chunk-DAYFZSC6.js} +12 -7
- package/build/browser/chunk-DAYFZSC6.js.map +1 -0
- package/build/browser/{chunk-2FHBRDJE.js → chunk-SBJIY4HI.js} +4 -2
- package/build/browser/chunk-SBJIY4HI.js.map +1 -0
- package/build/browser/{chunk-6YH6M42D.js → chunk-SBVYC5LT.js} +27 -5
- package/build/browser/chunk-SBVYC5LT.js.map +1 -0
- package/build/browser/{chunk-YYFW7BKO.js → chunk-XJLUGCCS.js} +4 -2
- package/build/browser/chunk-XJLUGCCS.js.map +1 -0
- package/build/{esm/handleGenerate-VFLDF32N-MSHFSMZL.js → browser/handleGenerate-QT3LC5N6-RICIAGZL.js} +13 -11
- package/build/browser/handleGenerate-QT3LC5N6-RICIAGZL.js.map +1 -0
- package/build/browser/index.js +69 -11
- package/build/browser/index.js.map +1 -1
- package/build/browser/loginFlow-X2LB2TEP.js +4 -0
- package/build/browser/{loginFlow-SCW45N4C.js.map → loginFlow-X2LB2TEP.js.map} +1 -1
- package/build/browser/{siteDeployCommand-BSIRE5LO.js → siteDeployCommand-EUH6JQ6Y.js} +10 -5
- package/build/browser/siteDeployCommand-EUH6JQ6Y.js.map +1 -0
- package/build/{esm/versionDeleteCommand-VYMA5Y5X.js → browser/versionDeleteCommand-GOZOHGOP.js} +8 -6
- package/build/browser/versionDeleteCommand-GOZOHGOP.js.map +1 -0
- package/build/{esm/versionGetCommand-6ZKCVSEL.js → browser/versionGetCommand-B37W7ZYA.js} +7 -5
- package/build/browser/versionGetCommand-B37W7ZYA.js.map +1 -0
- package/build/{esm/versionListCommand-ZW2RYG2Z.js → browser/versionListCommand-7WETBRT5.js} +7 -5
- package/build/browser/versionListCommand-7WETBRT5.js.map +1 -0
- package/build/browser/{versionSetCommand-F7GY5I2O.js → versionSetCommand-TLIE7BIO.js} +7 -5
- package/build/browser/versionSetCommand-TLIE7BIO.js.map +1 -0
- package/build/{esm/versionUnsetCommand-3NWQWDYX.js → browser/versionUnsetCommand-35NYMLKI.js} +8 -6
- package/build/browser/versionUnsetCommand-35NYMLKI.js.map +1 -0
- package/build/esm/{chunk-IRSUCKI2.js → chunk-5AQYUXAY.js} +4 -2
- package/build/esm/chunk-5AQYUXAY.js.map +1 -0
- package/build/esm/{chunk-G3PMV62Z.js → chunk-DAYFZSC6.js} +12 -3
- package/build/esm/chunk-DAYFZSC6.js.map +1 -0
- package/build/esm/{chunk-2FHBRDJE.js → chunk-SBJIY4HI.js} +4 -2
- package/build/esm/chunk-SBJIY4HI.js.map +1 -0
- package/build/esm/{chunk-6YH6M42D.js → chunk-SBVYC5LT.js} +27 -5
- package/build/esm/chunk-SBVYC5LT.js.map +1 -0
- package/build/esm/{chunk-YYFW7BKO.js → chunk-XJLUGCCS.js} +4 -2
- package/build/esm/chunk-XJLUGCCS.js.map +1 -0
- package/build/{browser/handleGenerate-VFLDF32N-MSHFSMZL.js → esm/handleGenerate-QT3LC5N6-RICIAGZL.js} +13 -11
- package/build/esm/handleGenerate-QT3LC5N6-RICIAGZL.js.map +1 -0
- package/build/esm/index.js +69 -11
- package/build/esm/index.js.map +1 -1
- package/build/esm/loginFlow-X2LB2TEP.js +4 -0
- package/build/esm/{loginFlow-SCW45N4C.js.map → loginFlow-X2LB2TEP.js.map} +1 -1
- package/build/esm/{siteDeployCommand-BSIRE5LO.js → siteDeployCommand-EUH6JQ6Y.js} +10 -5
- package/build/esm/siteDeployCommand-EUH6JQ6Y.js.map +1 -0
- package/build/{browser/versionDeleteCommand-VYMA5Y5X.js → esm/versionDeleteCommand-GOZOHGOP.js} +8 -6
- package/build/esm/versionDeleteCommand-GOZOHGOP.js.map +1 -0
- package/build/{browser/versionGetCommand-6ZKCVSEL.js → esm/versionGetCommand-B37W7ZYA.js} +7 -5
- package/build/esm/versionGetCommand-B37W7ZYA.js.map +1 -0
- package/build/{browser/versionListCommand-ZW2RYG2Z.js → esm/versionListCommand-7WETBRT5.js} +7 -5
- package/build/esm/versionListCommand-7WETBRT5.js.map +1 -0
- package/build/esm/{versionSetCommand-F7GY5I2O.js → versionSetCommand-TLIE7BIO.js} +7 -5
- package/build/esm/versionSetCommand-TLIE7BIO.js.map +1 -0
- package/build/{browser/versionUnsetCommand-3NWQWDYX.js → esm/versionUnsetCommand-35NYMLKI.js} +8 -6
- package/build/esm/versionUnsetCommand-35NYMLKI.js.map +1 -0
- package/package.json +4 -4
- package/build/browser/chunk-2FHBRDJE.js.map +0 -1
- package/build/browser/chunk-6YH6M42D.js.map +0 -1
- package/build/browser/chunk-G3PMV62Z.js +0 -33
- package/build/browser/chunk-G3PMV62Z.js.map +0 -1
- package/build/browser/chunk-IRSUCKI2.js.map +0 -1
- package/build/browser/chunk-YYFW7BKO.js.map +0 -1
- package/build/browser/handleGenerate-VFLDF32N-MSHFSMZL.js.map +0 -1
- package/build/browser/loginFlow-SCW45N4C.js +0 -4
- package/build/browser/siteDeployCommand-BSIRE5LO.js.map +0 -1
- package/build/browser/versionDeleteCommand-VYMA5Y5X.js.map +0 -1
- package/build/browser/versionGetCommand-6ZKCVSEL.js.map +0 -1
- package/build/browser/versionListCommand-ZW2RYG2Z.js.map +0 -1
- package/build/browser/versionSetCommand-F7GY5I2O.js.map +0 -1
- package/build/browser/versionUnsetCommand-3NWQWDYX.js.map +0 -1
- package/build/cjs/chunk-C7YB57DY.cjs +0 -207
- package/build/cjs/chunk-C7YB57DY.cjs.map +0 -1
- package/build/cjs/chunk-DQYIDDJN.cjs +0 -17
- package/build/cjs/chunk-DQYIDDJN.cjs.map +0 -1
- package/build/cjs/chunk-EMMSS5I5.cjs.map +0 -1
- package/build/cjs/chunk-KN4OGPAB.cjs +0 -74
- package/build/cjs/chunk-KN4OGPAB.cjs.map +0 -1
- package/build/cjs/chunk-V7DUQNL2.cjs +0 -125
- package/build/cjs/chunk-V7DUQNL2.cjs.map +0 -1
- package/build/cjs/handleGenerate-VFLDF32N-D6Y4BVBZ.cjs +0 -236
- package/build/cjs/handleGenerate-VFLDF32N-D6Y4BVBZ.cjs.map +0 -1
- package/build/cjs/index.cjs +0 -533
- package/build/cjs/index.cjs.map +0 -1
- package/build/cjs/loginFlow-DU7IQXS5.cjs +0 -10
- package/build/cjs/loginFlow-DU7IQXS5.cjs.map +0 -1
- package/build/cjs/siteDeployCommand-L77HPEVC.cjs +0 -161
- package/build/cjs/siteDeployCommand-L77HPEVC.cjs.map +0 -1
- package/build/cjs/versionDeleteCommand-4Y3Q4JRX.cjs +0 -35
- package/build/cjs/versionDeleteCommand-4Y3Q4JRX.cjs.map +0 -1
- package/build/cjs/versionGetCommand-WN42X6PF.cjs +0 -29
- package/build/cjs/versionGetCommand-WN42X6PF.cjs.map +0 -1
- package/build/cjs/versionListCommand-34JX7BFA.cjs +0 -34
- package/build/cjs/versionListCommand-34JX7BFA.cjs.map +0 -1
- package/build/cjs/versionSetCommand-Z4LLSOPX.cjs +0 -29
- package/build/cjs/versionSetCommand-Z4LLSOPX.cjs.map +0 -1
- package/build/cjs/versionUnsetCommand-DEOVPXMU.cjs +0 -34
- package/build/cjs/versionUnsetCommand-DEOVPXMU.cjs.map +0 -1
- package/build/esm/chunk-2FHBRDJE.js.map +0 -1
- package/build/esm/chunk-6YH6M42D.js.map +0 -1
- package/build/esm/chunk-G3PMV62Z.js.map +0 -1
- package/build/esm/chunk-IRSUCKI2.js.map +0 -1
- package/build/esm/chunk-YYFW7BKO.js.map +0 -1
- package/build/esm/handleGenerate-VFLDF32N-MSHFSMZL.js.map +0 -1
- package/build/esm/loginFlow-SCW45N4C.js +0 -4
- package/build/esm/siteDeployCommand-BSIRE5LO.js.map +0 -1
- package/build/esm/versionDeleteCommand-VYMA5Y5X.js.map +0 -1
- package/build/esm/versionGetCommand-6ZKCVSEL.js.map +0 -1
- package/build/esm/versionListCommand-ZW2RYG2Z.js.map +0 -1
- package/build/esm/versionSetCommand-F7GY5I2O.js.map +0 -1
- package/build/esm/versionUnsetCommand-3NWQWDYX.js.map +0 -1
package/build/cjs/index.cjs
DELETED
|
@@ -1,533 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkKN4OGPAB_cjs = require('./chunk-KN4OGPAB.cjs');
|
|
4
|
-
require('./chunk-EMMSS5I5.cjs');
|
|
5
|
-
var consola = require('consola');
|
|
6
|
-
var fs = require('fs');
|
|
7
|
-
var path = require('path');
|
|
8
|
-
|
|
9
|
-
var generateCommand = {
|
|
10
|
-
command: "generate",
|
|
11
|
-
describe: "Generate TypeScript SDK from ontology",
|
|
12
|
-
builder: (argv) => {
|
|
13
|
-
return argv.options({
|
|
14
|
-
outDir: {
|
|
15
|
-
type: "string",
|
|
16
|
-
description: "Where to place the generated files",
|
|
17
|
-
demandOption: true
|
|
18
|
-
},
|
|
19
|
-
ontologyPath: {
|
|
20
|
-
description: "Path to the ontology wire json",
|
|
21
|
-
type: "string",
|
|
22
|
-
demandOption: false,
|
|
23
|
-
conflicts: ["foundryUrl", "clientId"]
|
|
24
|
-
},
|
|
25
|
-
foundryUrl: {
|
|
26
|
-
description: "URL for the foundry stack that contains the ontology",
|
|
27
|
-
type: "string",
|
|
28
|
-
demandOption: false,
|
|
29
|
-
conflicts: "ontologyPath",
|
|
30
|
-
implies: "clientId",
|
|
31
|
-
alias: "stack"
|
|
32
|
-
// for backwards compatibility
|
|
33
|
-
},
|
|
34
|
-
clientId: {
|
|
35
|
-
description: "OAuth client ID for application",
|
|
36
|
-
type: "string",
|
|
37
|
-
demandOption: false,
|
|
38
|
-
conflicts: "ontologyPath",
|
|
39
|
-
implies: "foundryUrl"
|
|
40
|
-
},
|
|
41
|
-
ontologyRid: {
|
|
42
|
-
description: "Limit requests to this ontology rid only",
|
|
43
|
-
type: "string",
|
|
44
|
-
demandOption: false
|
|
45
|
-
},
|
|
46
|
-
ontologyWritePath: {
|
|
47
|
-
description: "Path to write the ontology wire json",
|
|
48
|
-
type: "string",
|
|
49
|
-
demandOption: false,
|
|
50
|
-
conflicts: ["ontologyPath"]
|
|
51
|
-
},
|
|
52
|
-
beta: {
|
|
53
|
-
type: "boolean",
|
|
54
|
-
description: "Should generate beta sdk",
|
|
55
|
-
demandOption: false
|
|
56
|
-
},
|
|
57
|
-
packageType: {
|
|
58
|
-
default: "commonjs",
|
|
59
|
-
choices: ["commonjs", "module"]
|
|
60
|
-
},
|
|
61
|
-
version: {
|
|
62
|
-
type: "string",
|
|
63
|
-
description: "Version of the generated code, or 'dev'",
|
|
64
|
-
demandOption: true
|
|
65
|
-
},
|
|
66
|
-
packageName: {
|
|
67
|
-
type: "string",
|
|
68
|
-
description: "Name of the package to generate"
|
|
69
|
-
},
|
|
70
|
-
asPackage: {
|
|
71
|
-
type: "boolean",
|
|
72
|
-
description: "Generate as a package (makes a package.json and co)"
|
|
73
|
-
},
|
|
74
|
-
clean: {
|
|
75
|
-
type: "boolean",
|
|
76
|
-
description: "Clean the output directory before generating"
|
|
77
|
-
},
|
|
78
|
-
internal: {
|
|
79
|
-
type: "boolean",
|
|
80
|
-
default: false
|
|
81
|
-
}
|
|
82
|
-
}).group(["ontologyPath", "outDir", "version"], "Generate from a local file").group(["foundryUrl", "clientId", "outDir", "ontologyWritePath", "version"], "OR Generate from Foundry").group(["packageName", "as"], "Package generation options").check((args) => {
|
|
83
|
-
if (!args.ontologyPath && !args.foundryUrl) {
|
|
84
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError("Must specify either ontologyPath or foundryUrl and clientId");
|
|
85
|
-
}
|
|
86
|
-
if (args.version !== "dev" && !chunkKN4OGPAB_cjs.isValidSemver(args.version)) {
|
|
87
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError("Version must be 'dev' or a valid semver version");
|
|
88
|
-
}
|
|
89
|
-
if (args.asPackage && !args.packageName) {
|
|
90
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError("Must specify packageName when generating as a package");
|
|
91
|
-
}
|
|
92
|
-
if (args.asPackage && !args.version) {
|
|
93
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError("Must specify version when generating as a package");
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
handler: async (args) => {
|
|
99
|
-
const command10 = await import('./handleGenerate-VFLDF32N-D6Y4BVBZ.cjs');
|
|
100
|
-
await command10.handleGenerate(args);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
var typescriptCommand = {
|
|
104
|
-
command: "typescript",
|
|
105
|
-
describe: "Manage code",
|
|
106
|
-
builder: (argv) => {
|
|
107
|
-
return argv.command(generateCommand).demandCommand();
|
|
108
|
-
},
|
|
109
|
-
handler: async (args) => {
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// src/commands/auth/login/index.ts
|
|
114
|
-
var command = {
|
|
115
|
-
command: "login",
|
|
116
|
-
describe: "Authenticate with an application ID",
|
|
117
|
-
builder: (argv) => {
|
|
118
|
-
return argv.option("clientId", {
|
|
119
|
-
alias: "applicationId",
|
|
120
|
-
// for backwards compatibility
|
|
121
|
-
type: "string",
|
|
122
|
-
demandOption: true,
|
|
123
|
-
describe: "OAuth client ID for application"
|
|
124
|
-
});
|
|
125
|
-
},
|
|
126
|
-
handler: async (args) => {
|
|
127
|
-
const command10 = await import('./loginFlow-DU7IQXS5.cjs');
|
|
128
|
-
await command10.default(args);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
var login_default = command;
|
|
132
|
-
|
|
133
|
-
// src/commands/auth/index.ts
|
|
134
|
-
var auth = {
|
|
135
|
-
command: "auth",
|
|
136
|
-
describe: "Manage your session",
|
|
137
|
-
builder: (argv) => {
|
|
138
|
-
return argv.options({
|
|
139
|
-
foundryUrl: {
|
|
140
|
-
type: "string",
|
|
141
|
-
demandOption: true,
|
|
142
|
-
alias: "baseUrl",
|
|
143
|
-
// for backwards compatibility
|
|
144
|
-
describe: "URL for the Foundry stack"
|
|
145
|
-
}
|
|
146
|
-
}).command(login_default).demandCommand();
|
|
147
|
-
},
|
|
148
|
-
handler: async (args) => {
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
var auth_default = auth;
|
|
152
|
-
var CONFIG_FILE_NAMES = ["foundry.config.json"];
|
|
153
|
-
var CONFIG_FILE_SCHEMA = {
|
|
154
|
-
type: "object",
|
|
155
|
-
properties: {
|
|
156
|
-
foundryUrl: {
|
|
157
|
-
type: "string"
|
|
158
|
-
},
|
|
159
|
-
site: {
|
|
160
|
-
type: "object",
|
|
161
|
-
properties: {
|
|
162
|
-
application: {
|
|
163
|
-
type: "string"
|
|
164
|
-
},
|
|
165
|
-
directory: {
|
|
166
|
-
type: "string"
|
|
167
|
-
},
|
|
168
|
-
autoVersion: {
|
|
169
|
-
type: "object",
|
|
170
|
-
nullable: true,
|
|
171
|
-
oneOf: [{
|
|
172
|
-
properties: {
|
|
173
|
-
type: {
|
|
174
|
-
const: "git-describe",
|
|
175
|
-
type: "string"
|
|
176
|
-
},
|
|
177
|
-
tagPrefix: {
|
|
178
|
-
type: "string",
|
|
179
|
-
nullable: true
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}],
|
|
183
|
-
required: ["type"]
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
required: ["application", "directory"]
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
required: ["foundryUrl", "site"],
|
|
190
|
-
additionalProperties: false
|
|
191
|
-
};
|
|
192
|
-
async function loadFoundryConfig() {
|
|
193
|
-
const ajvModule = await import('ajv');
|
|
194
|
-
const Ajv = ajvModule.default.default;
|
|
195
|
-
const ajv = new Ajv({
|
|
196
|
-
allErrors: true
|
|
197
|
-
});
|
|
198
|
-
const validate = ajv.compile(CONFIG_FILE_SCHEMA);
|
|
199
|
-
const {
|
|
200
|
-
findUp
|
|
201
|
-
} = await import('find-up');
|
|
202
|
-
const configFilePath = await findUp(CONFIG_FILE_NAMES);
|
|
203
|
-
if (configFilePath) {
|
|
204
|
-
let foundryConfig;
|
|
205
|
-
try {
|
|
206
|
-
const fileContent = await fs.promises.readFile(configFilePath, "utf-8");
|
|
207
|
-
foundryConfig = parseConfigFile(fileContent, configFilePath);
|
|
208
|
-
} catch (error) {
|
|
209
|
-
throw new chunkKN4OGPAB_cjs.ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);
|
|
210
|
-
}
|
|
211
|
-
if (!validate(foundryConfig)) {
|
|
212
|
-
throw new chunkKN4OGPAB_cjs.ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
foundryConfig,
|
|
216
|
-
configFilePath
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
return void 0;
|
|
220
|
-
}
|
|
221
|
-
function parseConfigFile(fileContent, configFilePath) {
|
|
222
|
-
const extension = path.extname(configFilePath);
|
|
223
|
-
switch (extension) {
|
|
224
|
-
case ".json":
|
|
225
|
-
return JSON.parse(fileContent);
|
|
226
|
-
default:
|
|
227
|
-
throw new chunkKN4OGPAB_cjs.ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// src/util/configLoader.ts
|
|
232
|
-
var configPromise = void 0;
|
|
233
|
-
function getConfig() {
|
|
234
|
-
if (configPromise == null) {
|
|
235
|
-
configPromise = loadFoundryConfig();
|
|
236
|
-
}
|
|
237
|
-
return configPromise;
|
|
238
|
-
}
|
|
239
|
-
var configLoader_default = getConfig;
|
|
240
|
-
async function logDeployCommandConfigFileOverride(args, config) {
|
|
241
|
-
if (config?.autoVersion != null && args.autoVersion !== config?.autoVersion.type) {
|
|
242
|
-
consola.consola.debug(`Overriding "autoVersion" from config file with ${args.autoVersion}`);
|
|
243
|
-
}
|
|
244
|
-
if (config?.directory != null && args.directory !== config?.directory) {
|
|
245
|
-
consola.consola.debug(`Overriding "directory" from config file with ${args.directory}`);
|
|
246
|
-
}
|
|
247
|
-
if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config?.autoVersion.tagPrefix) {
|
|
248
|
-
consola.consola.debug(`Overriding "gitTagPrefix" from config file with ${args.gitTagPrefix}`);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// src/commands/site/deploy/index.ts
|
|
253
|
-
var command2 = {
|
|
254
|
-
command: "deploy",
|
|
255
|
-
describe: "Deploy a new site version",
|
|
256
|
-
builder: async (argv) => {
|
|
257
|
-
const config = await configLoader_default();
|
|
258
|
-
const siteConfig = config?.foundryConfig.site;
|
|
259
|
-
const directory = siteConfig?.directory;
|
|
260
|
-
const autoVersion = siteConfig?.autoVersion;
|
|
261
|
-
const gitTagPrefix = autoVersion?.tagPrefix;
|
|
262
|
-
return argv.options({
|
|
263
|
-
directory: {
|
|
264
|
-
type: "string",
|
|
265
|
-
description: "Directory containing site files",
|
|
266
|
-
...directory ? {
|
|
267
|
-
default: directory
|
|
268
|
-
} : {
|
|
269
|
-
demandOption: true
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
uploadOnly: {
|
|
273
|
-
type: "boolean",
|
|
274
|
-
description: "Upload new site version only without setting as live",
|
|
275
|
-
default: false
|
|
276
|
-
},
|
|
277
|
-
version: {
|
|
278
|
-
type: "string",
|
|
279
|
-
description: "New version of site to deploy",
|
|
280
|
-
...autoVersion == null ? {
|
|
281
|
-
conflicts: "autoVersion"
|
|
282
|
-
} : {}
|
|
283
|
-
},
|
|
284
|
-
autoVersion: {
|
|
285
|
-
coerce: (autoVersion2) => autoVersion2,
|
|
286
|
-
type: "string",
|
|
287
|
-
choices: ["git-describe"],
|
|
288
|
-
description: "Enable auto versioning",
|
|
289
|
-
...autoVersion != null ? {
|
|
290
|
-
default: autoVersion.type
|
|
291
|
-
} : {
|
|
292
|
-
conflicts: "version"
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
gitTagPrefix: {
|
|
296
|
-
type: "string",
|
|
297
|
-
description: "Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.",
|
|
298
|
-
...gitTagPrefix ? {
|
|
299
|
-
default: gitTagPrefix
|
|
300
|
-
} : {}
|
|
301
|
-
}
|
|
302
|
-
}).group(["directory", "version", "uploadOnly"], "Deploy Options").group(["autoVersion", "gitTagPrefix"], "Auto Version Options").check((args) => {
|
|
303
|
-
if (autoVersion == null && args.autoVersion == null && args.version == null) {
|
|
304
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError("One of --version or --autoVersion must be specified");
|
|
305
|
-
}
|
|
306
|
-
if (args.version != null && !chunkKN4OGPAB_cjs.isValidSemver(args.version)) {
|
|
307
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError(`--version "${args.version}" must be a valid SemVer string`);
|
|
308
|
-
}
|
|
309
|
-
const autoVersionType = args.autoVersion ?? autoVersion;
|
|
310
|
-
if (autoVersionType !== "git-describe") {
|
|
311
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError(`Only 'git-describe' is supported for autoVersion`);
|
|
312
|
-
}
|
|
313
|
-
const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;
|
|
314
|
-
if (gitTagPrefixValue != null && autoVersionType !== "git-describe") {
|
|
315
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);
|
|
316
|
-
}
|
|
317
|
-
return true;
|
|
318
|
-
}).middleware((args) => logDeployCommandConfigFileOverride(args, siteConfig));
|
|
319
|
-
},
|
|
320
|
-
handler: async (args) => {
|
|
321
|
-
const command10 = await import('./siteDeployCommand-L77HPEVC.cjs');
|
|
322
|
-
const {
|
|
323
|
-
version,
|
|
324
|
-
autoVersion,
|
|
325
|
-
gitTagPrefix,
|
|
326
|
-
...restArgs
|
|
327
|
-
} = args;
|
|
328
|
-
const selectedVersion = args.version != null ? args.version : {
|
|
329
|
-
type: args.autoVersion,
|
|
330
|
-
tagPrefix: args.gitTagPrefix
|
|
331
|
-
};
|
|
332
|
-
await command10.default({
|
|
333
|
-
...restArgs,
|
|
334
|
-
selectedVersion
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
var deploy_default = command2;
|
|
339
|
-
async function logSiteCommandConfigFileOverride(args, config) {
|
|
340
|
-
if (config?.site.application != null && args.application !== config.site.application) {
|
|
341
|
-
consola.consola.debug(`Overriding "application" from config file with ${args.application}`);
|
|
342
|
-
}
|
|
343
|
-
if (config?.foundryUrl != null && args.foundryUrl !== config.foundryUrl) {
|
|
344
|
-
consola.consola.debug(`Overriding "foundryUrl" from config file with ${args.foundryUrl}`);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// src/commands/site/version/delete/index.ts
|
|
349
|
-
var command3 = {
|
|
350
|
-
command: "delete <version>",
|
|
351
|
-
describe: "Delete site version",
|
|
352
|
-
builder: (argv) => {
|
|
353
|
-
return argv.positional("version", {
|
|
354
|
-
type: "string",
|
|
355
|
-
demandOption: true,
|
|
356
|
-
description: "Version to set as live"
|
|
357
|
-
}).option("yes", {
|
|
358
|
-
alias: "y",
|
|
359
|
-
type: "boolean",
|
|
360
|
-
description: "Automatically confirm destructive changes"
|
|
361
|
-
}).group(["yes"], "Delete Options");
|
|
362
|
-
},
|
|
363
|
-
handler: async (args) => {
|
|
364
|
-
const command10 = await import('./versionDeleteCommand-4Y3Q4JRX.cjs');
|
|
365
|
-
await command10.default(args);
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
var delete_default = command3;
|
|
369
|
-
|
|
370
|
-
// src/commands/site/version/get/index.ts
|
|
371
|
-
var command4 = {
|
|
372
|
-
command: "get",
|
|
373
|
-
describe: "Get live site version",
|
|
374
|
-
builder: (argv) => {
|
|
375
|
-
return argv;
|
|
376
|
-
},
|
|
377
|
-
handler: async (args) => {
|
|
378
|
-
const command10 = await import('./versionGetCommand-WN42X6PF.cjs');
|
|
379
|
-
await command10.default(args);
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
var get_default = command4;
|
|
383
|
-
|
|
384
|
-
// src/commands/site/version/list/index.ts
|
|
385
|
-
var command5 = {
|
|
386
|
-
command: "list",
|
|
387
|
-
describe: "List site versions",
|
|
388
|
-
builder: (argv) => {
|
|
389
|
-
return argv;
|
|
390
|
-
},
|
|
391
|
-
handler: async (args) => {
|
|
392
|
-
const command10 = await import('./versionListCommand-34JX7BFA.cjs');
|
|
393
|
-
await command10.default(args);
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
var list_default = command5;
|
|
397
|
-
|
|
398
|
-
// src/commands/site/version/set/index.ts
|
|
399
|
-
var command6 = {
|
|
400
|
-
command: "set <version>",
|
|
401
|
-
describe: "Set live site version",
|
|
402
|
-
builder: (argv) => {
|
|
403
|
-
return argv.positional("version", {
|
|
404
|
-
type: "string",
|
|
405
|
-
demandOption: true,
|
|
406
|
-
description: "Version to set as live"
|
|
407
|
-
});
|
|
408
|
-
},
|
|
409
|
-
handler: async (args) => {
|
|
410
|
-
const command10 = await import('./versionSetCommand-Z4LLSOPX.cjs');
|
|
411
|
-
await command10.default(args);
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
var set_default = command6;
|
|
415
|
-
|
|
416
|
-
// src/commands/site/version/unset/index.ts
|
|
417
|
-
var command7 = {
|
|
418
|
-
command: "unset",
|
|
419
|
-
describe: "Clear live site version",
|
|
420
|
-
builder: (argv) => {
|
|
421
|
-
return argv.option("yes", {
|
|
422
|
-
alias: "y",
|
|
423
|
-
type: "boolean",
|
|
424
|
-
description: "Automatically confirm destructive changes"
|
|
425
|
-
}).group(["yes"], "Unset Options");
|
|
426
|
-
},
|
|
427
|
-
handler: async (args) => {
|
|
428
|
-
const command10 = await import('./versionUnsetCommand-DEOVPXMU.cjs');
|
|
429
|
-
await command10.default(args);
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
var unset_default = command7;
|
|
433
|
-
|
|
434
|
-
// src/commands/site/version/index.ts
|
|
435
|
-
var command8 = {
|
|
436
|
-
command: "version",
|
|
437
|
-
describe: "Manage site versions",
|
|
438
|
-
builder: (argv) => {
|
|
439
|
-
return argv.command(list_default).command(get_default).command(set_default).command(unset_default).command(delete_default).demandCommand();
|
|
440
|
-
},
|
|
441
|
-
handler: async (args) => {
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
var version_default = command8;
|
|
445
|
-
|
|
446
|
-
// src/commands/site/index.ts
|
|
447
|
-
var command9 = {
|
|
448
|
-
command: "site",
|
|
449
|
-
describe: "Manage your site",
|
|
450
|
-
builder: async (argv) => {
|
|
451
|
-
const config = await configLoader_default();
|
|
452
|
-
const application = config?.foundryConfig.site.application;
|
|
453
|
-
const foundryUrl = config?.foundryConfig.foundryUrl;
|
|
454
|
-
return argv.options({
|
|
455
|
-
application: {
|
|
456
|
-
type: "string",
|
|
457
|
-
coerce: (application2) => application2,
|
|
458
|
-
...application ? {
|
|
459
|
-
default: application
|
|
460
|
-
} : {
|
|
461
|
-
demandOption: true
|
|
462
|
-
},
|
|
463
|
-
description: "Application resource identifier (rid)"
|
|
464
|
-
},
|
|
465
|
-
foundryUrl: {
|
|
466
|
-
coerce: (foundryUrl2) => foundryUrl2.replace(/\/$/, ""),
|
|
467
|
-
type: "string",
|
|
468
|
-
...foundryUrl ? {
|
|
469
|
-
default: foundryUrl
|
|
470
|
-
} : {
|
|
471
|
-
demandOption: true
|
|
472
|
-
},
|
|
473
|
-
description: "URL for the Foundry stack"
|
|
474
|
-
},
|
|
475
|
-
token: {
|
|
476
|
-
type: "string",
|
|
477
|
-
conflicts: "tokenFile",
|
|
478
|
-
description: "Foundry API token"
|
|
479
|
-
},
|
|
480
|
-
tokenFile: {
|
|
481
|
-
type: "string",
|
|
482
|
-
conflicts: "token",
|
|
483
|
-
description: "Path to file containing Foundry API token"
|
|
484
|
-
}
|
|
485
|
-
}).group(["application", "foundryUrl", "token", "tokenFile"], "Common Options").command(version_default).command(deploy_default).check((args) => {
|
|
486
|
-
if (!args.foundryUrl.startsWith("https://")) {
|
|
487
|
-
throw new chunkKN4OGPAB_cjs.YargsCheckError("foundryUrl must start with https://");
|
|
488
|
-
}
|
|
489
|
-
return true;
|
|
490
|
-
}).middleware((args) => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();
|
|
491
|
-
},
|
|
492
|
-
handler: async (args) => {
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
var site_default = command9;
|
|
496
|
-
var firstTime = true;
|
|
497
|
-
async function logConfigFileMiddleware() {
|
|
498
|
-
if (firstTime) {
|
|
499
|
-
firstTime = false;
|
|
500
|
-
const config = configLoader_default();
|
|
501
|
-
const configFilePath = (await config)?.configFilePath;
|
|
502
|
-
if (configFilePath) {
|
|
503
|
-
consola.consola.debug(`Using configuration from file: "${configFilePath}"`);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
// src/cli.ts
|
|
509
|
-
async function cli(args = process.argv) {
|
|
510
|
-
consola.consola.info(`Palantir OSDK CLI ${"0.23.0"}
|
|
511
|
-
`);
|
|
512
|
-
const base = chunkKN4OGPAB_cjs.getYargsBase(args);
|
|
513
|
-
try {
|
|
514
|
-
return await base.middleware(logConfigFileMiddleware).command(site_default).command({
|
|
515
|
-
command: "unstable",
|
|
516
|
-
aliases: ["experimental"],
|
|
517
|
-
describe: "Unstable commands",
|
|
518
|
-
builder: async (argv) => {
|
|
519
|
-
return argv.command(typescriptCommand).command(auth_default).demandCommand();
|
|
520
|
-
},
|
|
521
|
-
handler: (_args) => {
|
|
522
|
-
}
|
|
523
|
-
}).parseAsync();
|
|
524
|
-
} catch (err) {
|
|
525
|
-
if (err instanceof chunkKN4OGPAB_cjs.ExitProcessError) {
|
|
526
|
-
consola.consola.error(err);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
exports.cli = cli;
|
|
532
|
-
//# sourceMappingURL=index.cjs.map
|
|
533
|
-
//# sourceMappingURL=index.cjs.map
|
package/build/cjs/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../cli.cmd.typescript/build/esm/index.js","../../src/commands/auth/login/index.ts","../../src/commands/auth/index.ts","../../src/util/config.ts","../../src/util/configLoader.ts","../../src/commands/site/deploy/logDeployCommandConfigFileOverride.ts","../../src/commands/site/deploy/index.ts","../../src/commands/site/logSiteCommandConfigFileOverride.ts","../../src/commands/site/version/delete/index.ts","../../src/commands/site/version/get/index.ts","../../src/commands/site/version/list/index.ts","../../src/commands/site/version/set/index.ts","../../src/commands/site/version/unset/index.ts","../../src/commands/site/version/index.ts","../../src/commands/site/index.ts","../../src/yargs/logConfigFileMiddleware.ts","../../src/cli.ts"],"names":["YargsCheckError","isValidSemver","command","fsPromises","ExitProcessError","extname","consola","autoVersion","application","foundryUrl","getYargsBase"],"mappings":";;;;;;;;AAIA,IAAI,eAAkB,GAAA;AAAA,EACpB,OAAS,EAAA,UAAA;AAAA,EACT,QAAU,EAAA,uCAAA;AAAA,EACV,SAAS,CAAQ,IAAA,KAAA;AACf,IAAA,OAAO,KAAK,OAAQ,CAAA;AAAA,MAClB,MAAQ,EAAA;AAAA,QACN,IAAM,EAAA,QAAA;AAAA,QACN,WAAa,EAAA,oCAAA;AAAA,QACb,YAAc,EAAA,IAAA;AAAA,OAChB;AAAA,MACA,YAAc,EAAA;AAAA,QACZ,WAAa,EAAA,gCAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAA,EAAW,CAAC,YAAA,EAAc,UAAU,CAAA;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A,CAAA;AACZ,IAAA,MAAM,SAAS,oBAAU,EAAA,CAAA;AACzB,IAAM,MAAA,cAAA,GAAA,CAAkB,MAAM,MAAS,GAAA,cAAA,CAAA;AACvC,IAAA,IAAI,cAAgB,EAAA;AAClB,MAAAI,eAAQ,CAAA,KAAA,CAAM,CAAmC,gCAAA,EAAA,cAAc,CAAG,CAAA,CAAA,CAAA,CAAA;AAAA,KACpE;AAAA,GACF;AACF,CAAA;;;ACNA,eAAsB,GAAA,CAAI,IAAO,GAAA,OAAA,CAAQ,IAAM,EAAA;AAC7C,EAAAA,eAAAA,CAAQ,IAAK,CAAA,CAAA,kBAAA,EAAqB,QAA2B,CAAA;AAAA,CAAI,CAAA,CAAA;AACjE,EAAM,MAAA,IAAA,GAAOI,+BAAa,IAAI,CAAA,CAAA;AAG9B,EAAI,IAAA;AACF,IAAO,OAAA,MAAM,KAAK,UAAW,CAAA,uBAAuB,EAAE,OAAQ,CAAA,YAAI,EAAE,OAAQ,CAAA;AAAA,MAC1E,OAAS,EAAA,UAAA;AAAA,MACT,OAAA,EAAS,CAAC,cAAc,CAAA;AAAA,MACxB,QAAU,EAAA,mBAAA;AAAA,MACV,OAAA,EAAS,OAAM,IAAQ,KAAA;AACrB,QAAA,OAAO,KAAK,OAAQ,CAAA,iBAAU,EAAE,OAAQ,CAAA,YAAI,EAAE,aAAc,EAAA,CAAA;AAAA,OAC9D;AAAA,MACA,SAAS,CAAS,KAAA,KAAA;AAAA,OAAC;AAAA,KACpB,EAAE,UAAW,EAAA,CAAA;AAAA,WACP,GAAK,EAAA;AACZ,IAAA,IAAI,eAAeN,kCAAkB,EAAA;AACnC,MAAAE,eAAAA,CAAQ,MAAM,GAAG,CAAA,CAAA;AAAA,KACnB;AAAA,GACF;AACF","file":"index.cjs","sourcesContent":["import { getYargsBase, ExitProcessError, YargsCheckError, isValidSemver } from '@osdk/cli.common';\nimport { consola } from 'consola';\n\n// src/cli.ts\nvar generateCommand = {\n command: \"generate\",\n describe: \"Generate TypeScript SDK from ontology\",\n builder: argv => {\n return argv.options({\n outDir: {\n type: \"string\",\n description: \"Where to place the generated files\",\n demandOption: true\n },\n ontologyPath: {\n description: \"Path to the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"foundryUrl\", \"clientId\"]\n },\n foundryUrl: {\n description: \"URL for the foundry stack that contains the ontology\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"clientId\",\n alias: \"stack\"\n // for backwards compatibility\n },\n clientId: {\n description: \"OAuth client ID for application\",\n type: \"string\",\n demandOption: false,\n conflicts: \"ontologyPath\",\n implies: \"foundryUrl\"\n },\n ontologyRid: {\n description: \"Limit requests to this ontology rid only\",\n type: \"string\",\n demandOption: false\n },\n ontologyWritePath: {\n description: \"Path to write the ontology wire json\",\n type: \"string\",\n demandOption: false,\n conflicts: [\"ontologyPath\"]\n },\n beta: {\n type: \"boolean\",\n description: \"Should generate beta sdk\",\n demandOption: false\n },\n packageType: {\n default: \"commonjs\",\n choices: [\"commonjs\", \"module\"]\n },\n version: {\n type: \"string\",\n description: \"Version of the generated code, or 'dev'\",\n demandOption: true\n },\n packageName: {\n type: \"string\",\n description: \"Name of the package to generate\"\n },\n asPackage: {\n type: \"boolean\",\n description: \"Generate as a package (makes a package.json and co)\"\n },\n clean: {\n type: \"boolean\",\n description: \"Clean the output directory before generating\"\n },\n internal: {\n type: \"boolean\",\n default: false\n }\n }).group([\"ontologyPath\", \"outDir\", \"version\"], \"Generate from a local file\").group([\"foundryUrl\", \"clientId\", \"outDir\", \"ontologyWritePath\", \"version\"], \"OR Generate from Foundry\").group([\"packageName\", \"as\"], \"Package generation options\").check(args => {\n if (!args.ontologyPath && !args.foundryUrl) {\n throw new YargsCheckError(\"Must specify either ontologyPath or foundryUrl and clientId\");\n }\n if (args.version !== \"dev\" && !isValidSemver(args.version)) {\n throw new YargsCheckError(\"Version must be 'dev' or a valid semver version\");\n }\n if (args.asPackage && !args.packageName) {\n throw new YargsCheckError(\"Must specify packageName when generating as a package\");\n }\n if (args.asPackage && !args.version) {\n throw new YargsCheckError(\"Must specify version when generating as a package\");\n }\n return true;\n });\n },\n handler: async args => {\n const command = await import('./handleGenerate-VFLDF32N.js');\n await command.handleGenerate(args);\n }\n};\n\n// src/cli.ts\nasync function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${\"0.5.0\"}\n`);\n const base = getYargsBase(args);\n try {\n return await base.command(generateCommand).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}\n\n// src/typescriptCommand.ts\nvar typescriptCommand = {\n command: \"typescript\",\n describe: \"Manage code\",\n builder: argv => {\n return argv.command(generateCommand).demandCommand();\n },\n handler: async args => {}\n};\nexport { cli, typescriptCommand as default };","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const command = {\n command: \"login\",\n describe: \"Authenticate with an application ID\",\n builder: argv => {\n return argv.option(\"clientId\", {\n alias: \"applicationId\",\n // for backwards compatibility\n type: \"string\",\n demandOption: true,\n describe: \"OAuth client ID for application\"\n });\n },\n handler: async args => {\n const command = await import(\"@osdk/cli.common/loginFlow\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport login from \"./login/index.js\";\nconst auth = {\n command: \"auth\",\n describe: \"Manage your session\",\n builder: argv => {\n return argv.options({\n foundryUrl: {\n type: \"string\",\n demandOption: true,\n alias: \"baseUrl\",\n // for backwards compatibility\n describe: \"URL for the Foundry stack\"\n }\n }).command(login).demandCommand();\n },\n handler: async args => {}\n};\nexport default auth;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport { promises as fsPromises } from \"node:fs\";\nimport { extname } from \"node:path\";\nconst CONFIG_FILE_NAMES = [\"foundry.config.json\"];\nconst CONFIG_FILE_SCHEMA = {\n type: \"object\",\n properties: {\n foundryUrl: {\n type: \"string\"\n },\n site: {\n type: \"object\",\n properties: {\n application: {\n type: \"string\"\n },\n directory: {\n type: \"string\"\n },\n autoVersion: {\n type: \"object\",\n nullable: true,\n oneOf: [{\n properties: {\n type: {\n const: \"git-describe\",\n type: \"string\"\n },\n tagPrefix: {\n type: \"string\",\n nullable: true\n }\n }\n }],\n required: [\"type\"]\n }\n },\n required: [\"application\", \"directory\"]\n }\n },\n required: [\"foundryUrl\", \"site\"],\n additionalProperties: false\n};\n\n/**\n * Asynchronously loads a configuration file. Looks for any of the CONFIG_FILE_NAMES in the current directory going up to the root directory.\n * @returns A promise that resolves to the configuration JSON object, or undefined if not found.\n * @throws Will throw an error if the configuration file is found but cannot be read or parsed.\n */\nexport async function loadFoundryConfig() {\n const ajvModule = await import(\"ajv\");\n const Ajv = ajvModule.default.default; // https://github.com/ajv-validator/ajv/issues/2132\n const ajv = new Ajv({\n allErrors: true\n });\n const validate = ajv.compile(CONFIG_FILE_SCHEMA);\n const {\n findUp\n } = await import(\"find-up\");\n const configFilePath = await findUp(CONFIG_FILE_NAMES);\n if (configFilePath) {\n let foundryConfig;\n try {\n const fileContent = await fsPromises.readFile(configFilePath, \"utf-8\");\n foundryConfig = parseConfigFile(fileContent, configFilePath);\n } catch (error) {\n throw new ExitProcessError(2, `Couldn't read or parse config file ${configFilePath}. Error: ${error}`);\n }\n if (!validate(foundryConfig)) {\n throw new ExitProcessError(2, `The configuration file does not match the expected schema: ${ajv.errorsText(validate.errors)}`);\n }\n return {\n foundryConfig,\n configFilePath\n };\n }\n return undefined;\n}\nfunction parseConfigFile(fileContent, configFilePath) {\n const extension = extname(configFilePath);\n switch (extension) {\n case \".json\":\n return JSON.parse(fileContent);\n default:\n throw new ExitProcessError(2, `Unsupported file extension: ${extension} for config file.`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { loadFoundryConfig } from \"./config.js\";\nlet configPromise = undefined;\nfunction getConfig() {\n if (configPromise == null) {\n configPromise = loadFoundryConfig();\n }\n return configPromise;\n}\nexport default getConfig;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logDeployCommandConfigFileOverride(args, config) {\n if (config?.autoVersion != null && args.autoVersion !== config?.autoVersion.type) {\n consola.debug(`Overriding \"autoVersion\" from config file with ${args.autoVersion}`);\n }\n if (config?.directory != null && args.directory !== config?.directory) {\n consola.debug(`Overriding \"directory\" from config file with ${args.directory}`);\n }\n if (config?.autoVersion?.tagPrefix != null && args.gitTagPrefix != null && args.gitTagPrefix !== config?.autoVersion.tagPrefix) {\n consola.debug(`Overriding \"gitTagPrefix\" from config file with ${args.gitTagPrefix}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isValidSemver, YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../../util/configLoader.js\";\nimport { logDeployCommandConfigFileOverride } from \"./logDeployCommandConfigFileOverride.js\";\nconst command = {\n command: \"deploy\",\n describe: \"Deploy a new site version\",\n builder: async argv => {\n const config = await configLoader();\n const siteConfig = config?.foundryConfig.site;\n const directory = siteConfig?.directory;\n const autoVersion = siteConfig?.autoVersion;\n const gitTagPrefix = autoVersion?.tagPrefix;\n return argv.options({\n directory: {\n type: \"string\",\n description: \"Directory containing site files\",\n ...(directory ? {\n default: directory\n } : {\n demandOption: true\n })\n },\n uploadOnly: {\n type: \"boolean\",\n description: \"Upload new site version only without setting as live\",\n default: false\n },\n version: {\n type: \"string\",\n description: \"New version of site to deploy\",\n ...(autoVersion == null ? {\n conflicts: \"autoVersion\"\n } : {})\n },\n autoVersion: {\n coerce: autoVersion => autoVersion,\n type: \"string\",\n choices: [\"git-describe\"],\n description: \"Enable auto versioning\",\n ...(autoVersion != null ? {\n default: autoVersion.type\n } : {\n conflicts: \"version\"\n })\n },\n gitTagPrefix: {\n type: \"string\",\n description: \"Prefix to match git tags on when 'git-describe' auto versioning is used. If not provided, all tags are matched and the prefix 'v' is stripped if present.\",\n ...(gitTagPrefix ? {\n default: gitTagPrefix\n } : {})\n }\n }).group([\"directory\", \"version\", \"uploadOnly\"], \"Deploy Options\").group([\"autoVersion\", \"gitTagPrefix\"], \"Auto Version Options\").check(args => {\n // This is required because we can't use demandOption with conflicts. conflicts protects us against the case where both are provided.\n // So this case is for when nothing is provided.\n if (autoVersion == null && args.autoVersion == null && args.version == null) {\n throw new YargsCheckError(\"One of --version or --autoVersion must be specified\");\n }\n if (args.version != null && !isValidSemver(args.version)) {\n throw new YargsCheckError(`--version \"${args.version}\" must be a valid SemVer string`);\n }\n const autoVersionType = args.autoVersion ?? autoVersion;\n if (autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`Only 'git-describe' is supported for autoVersion`);\n }\n const gitTagPrefixValue = args.gitTagPrefix ?? gitTagPrefix;\n // Future proofing for when we support other autoVersion types\n if (gitTagPrefixValue != null && autoVersionType !== \"git-describe\") {\n throw new YargsCheckError(`--gitTagPrefix is only supported when --autoVersion=git-describe`);\n }\n return true;\n }).middleware(args => logDeployCommandConfigFileOverride(args, siteConfig));\n },\n handler: async args => {\n const command = await import(\"./siteDeployCommand.mjs\");\n const {\n version,\n autoVersion,\n gitTagPrefix,\n ...restArgs\n } = args;\n const selectedVersion = args.version != null ? args.version : {\n type: args.autoVersion,\n tagPrefix: args.gitTagPrefix\n };\n await command.default({\n ...restArgs,\n selectedVersion\n });\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nexport async function logSiteCommandConfigFileOverride(args, config) {\n if (config?.site.application != null && args.application !== config.site.application) {\n consola.debug(`Overriding \"application\" from config file with ${args.application}`);\n }\n if (config?.foundryUrl != null && args.foundryUrl !== config.foundryUrl) {\n consola.debug(`Overriding \"foundryUrl\" from config file with ${args.foundryUrl}`);\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"delete <version>\",\n describe: \"Delete site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n }).option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Delete Options\");\n },\n handler: async args => {\n const command = await import(\"./versionDeleteCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"get\",\n describe: \"Get live site version\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionGetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"list\",\n describe: \"List site versions\",\n builder: argv => {\n return argv;\n },\n handler: async args => {\n const command = await import(\"./versionListCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"set <version>\",\n describe: \"Set live site version\",\n builder: argv => {\n return argv.positional(\"version\", {\n type: \"string\",\n demandOption: true,\n description: \"Version to set as live\"\n });\n },\n handler: async args => {\n const command = await import(\"./versionSetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst command = {\n command: \"unset\",\n describe: \"Clear live site version\",\n builder: argv => {\n return argv.option(\"yes\", {\n alias: \"y\",\n type: \"boolean\",\n description: \"Automatically confirm destructive changes\"\n }).group([\"yes\"], \"Unset Options\");\n },\n handler: async args => {\n const command = await import(\"./versionUnsetCommand.mjs\");\n await command.default(args);\n }\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport deleteCmd from \"./delete/index.js\";\nimport get from \"./get/index.js\";\nimport list from \"./list/index.js\";\nimport set from \"./set/index.js\";\nimport unset from \"./unset/index.js\";\nconst command = {\n command: \"version\",\n describe: \"Manage site versions\",\n builder: argv => {\n return argv.command(list).command(get).command(set).command(unset).command(deleteCmd).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { YargsCheckError } from \"@osdk/cli.common\";\nimport configLoader from \"../../util/configLoader.js\";\nimport deploy from \"./deploy/index.js\";\nimport { logSiteCommandConfigFileOverride } from \"./logSiteCommandConfigFileOverride.js\";\nimport version from \"./version/index.js\";\nconst command = {\n command: \"site\",\n describe: \"Manage your site\",\n builder: async argv => {\n const config = await configLoader();\n const application = config?.foundryConfig.site.application;\n const foundryUrl = config?.foundryConfig.foundryUrl;\n return argv.options({\n application: {\n type: \"string\",\n coerce: application => application,\n ...(application ? {\n default: application\n } : {\n demandOption: true\n }),\n description: \"Application resource identifier (rid)\"\n },\n foundryUrl: {\n coerce: foundryUrl => foundryUrl.replace(/\\/$/, \"\"),\n type: \"string\",\n ...(foundryUrl ? {\n default: foundryUrl\n } : {\n demandOption: true\n }),\n description: \"URL for the Foundry stack\"\n },\n token: {\n type: \"string\",\n conflicts: \"tokenFile\",\n description: \"Foundry API token\"\n },\n tokenFile: {\n type: \"string\",\n conflicts: \"token\",\n description: \"Path to file containing Foundry API token\"\n }\n }).group([\"application\", \"foundryUrl\", \"token\", \"tokenFile\"], \"Common Options\").command(version).command(deploy).check(args => {\n if (!args.foundryUrl.startsWith(\"https://\")) {\n throw new YargsCheckError(\"foundryUrl must start with https://\");\n }\n return true;\n }).middleware(args => logSiteCommandConfigFileOverride(args, config?.foundryConfig)).demandCommand();\n },\n handler: async args => {}\n};\nexport default command;","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { consola } from \"consola\";\nimport getConfig from \"../util/configLoader.js\";\nlet firstTime = true;\nexport async function logConfigFileMiddleware() {\n if (firstTime) {\n firstTime = false;\n const config = getConfig();\n const configFilePath = (await config)?.configFilePath;\n if (configFilePath) {\n consola.debug(`Using configuration from file: \"${configFilePath}\"`);\n }\n }\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport typescript from \"@osdk/cli.cmd.typescript\";\nimport { ExitProcessError, getYargsBase } from \"@osdk/cli.common\";\nimport { consola } from \"consola\";\nimport auth from \"./commands/auth/index.js\";\nimport site from \"./commands/site/index.js\";\nimport { logConfigFileMiddleware } from \"./yargs/logConfigFileMiddleware.js\";\nexport async function cli(args = process.argv) {\n consola.info(`Palantir OSDK CLI ${process.env.PACKAGE_VERSION}\\n`);\n const base = getYargsBase(args);\n\n // Special handling where failures happen before yargs does its error handling within .fail\n try {\n return await base.middleware(logConfigFileMiddleware).command(site).command({\n command: \"unstable\",\n aliases: [\"experimental\"],\n describe: \"Unstable commands\",\n builder: async argv => {\n return argv.command(typescript).command(auth).demandCommand();\n },\n handler: _args => {}\n }).parseAsync();\n } catch (err) {\n if (err instanceof ExitProcessError) {\n consola.error(err);\n }\n }\n}"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkV7DUQNL2_cjs = require('./chunk-V7DUQNL2.cjs');
|
|
4
|
-
require('./chunk-EMMSS5I5.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
module.exports = chunkV7DUQNL2_cjs.invokeLoginFlow;
|
|
9
|
-
//# sourceMappingURL=loginFlow-DU7IQXS5.cjs.map
|
|
10
|
-
//# sourceMappingURL=loginFlow-DU7IQXS5.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"loginFlow-DU7IQXS5.cjs"}
|