@osdk/cli 0.23.4 → 0.23.5
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 +7 -0
- package/build/browser/{chunk-6XRLZ4NI.js → chunk-LPJS5ZNF.js} +3 -3
- package/build/browser/{chunk-6XRLZ4NI.js.map → chunk-LPJS5ZNF.js.map} +1 -1
- package/build/{esm/handleGenerate-VWGGTJFP-BST3K5IL.js → browser/handleGenerate-YR4JL5YQ-6PD5RUWK.js} +6 -6
- package/build/{esm/handleGenerate-VWGGTJFP-BST3K5IL.js.map → browser/handleGenerate-YR4JL5YQ-6PD5RUWK.js.map} +1 -1
- package/build/browser/index.js +8 -8
- package/build/browser/index.js.map +1 -1
- package/build/{esm/siteDeployCommand-OTC7YJPE.js → browser/siteDeployCommand-IXZF67R5.js} +3 -3
- package/build/browser/{siteDeployCommand-OTC7YJPE.js.map → siteDeployCommand-IXZF67R5.js.map} +1 -1
- package/build/browser/{versionDeleteCommand-FAWEUE7W.js → versionDeleteCommand-PYZGRY5B.js} +3 -3
- package/build/browser/{versionDeleteCommand-FAWEUE7W.js.map → versionDeleteCommand-PYZGRY5B.js.map} +1 -1
- package/build/{esm/versionGetCommand-KA3ON6B4.js → browser/versionGetCommand-XNSKVJFD.js} +3 -3
- package/build/browser/{versionGetCommand-KA3ON6B4.js.map → versionGetCommand-XNSKVJFD.js.map} +1 -1
- package/build/{esm/versionListCommand-W4EZAJFX.js → browser/versionListCommand-UJHOSVJG.js} +3 -3
- package/build/browser/{versionListCommand-W4EZAJFX.js.map → versionListCommand-UJHOSVJG.js.map} +1 -1
- package/build/{esm/versionSetCommand-NOLE7BFA.js → browser/versionSetCommand-XMSTHJ4Q.js} +3 -3
- package/build/browser/{versionSetCommand-NOLE7BFA.js.map → versionSetCommand-XMSTHJ4Q.js.map} +1 -1
- package/build/browser/{versionUnsetCommand-ZPNPJYW4.js → versionUnsetCommand-MKZ46AR4.js} +3 -3
- package/build/browser/{versionUnsetCommand-ZPNPJYW4.js.map → versionUnsetCommand-MKZ46AR4.js.map} +1 -1
- package/build/cjs/{chunk-G5YZIKWW.cjs → chunk-V2NDGUCJ.cjs} +3 -3
- package/build/cjs/{chunk-G5YZIKWW.cjs.map → chunk-V2NDGUCJ.cjs.map} +1 -1
- package/build/cjs/{handleGenerate-VWGGTJFP-DUDYQLMC.cjs → handleGenerate-YR4JL5YQ-TL4EZCHU.cjs} +7 -7
- package/build/cjs/{handleGenerate-VWGGTJFP-DUDYQLMC.cjs.map → handleGenerate-YR4JL5YQ-TL4EZCHU.cjs.map} +1 -1
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/{siteDeployCommand-UN2XO5OL.cjs → siteDeployCommand-HVWOT4OP.cjs} +8 -8
- package/build/cjs/{siteDeployCommand-UN2XO5OL.cjs.map → siteDeployCommand-HVWOT4OP.cjs.map} +1 -1
- package/build/cjs/{versionDeleteCommand-W3LXTLB6.cjs → versionDeleteCommand-UIM5TVLN.cjs} +6 -6
- package/build/cjs/{versionDeleteCommand-W3LXTLB6.cjs.map → versionDeleteCommand-UIM5TVLN.cjs.map} +1 -1
- package/build/cjs/{versionGetCommand-G3HEWPX4.cjs → versionGetCommand-NL3SPFFI.cjs} +6 -6
- package/build/cjs/{versionGetCommand-G3HEWPX4.cjs.map → versionGetCommand-NL3SPFFI.cjs.map} +1 -1
- package/build/cjs/{versionListCommand-OEZ4IV7I.cjs → versionListCommand-67BK5V6Y.cjs} +6 -6
- package/build/cjs/{versionListCommand-OEZ4IV7I.cjs.map → versionListCommand-67BK5V6Y.cjs.map} +1 -1
- package/build/cjs/{versionSetCommand-RGR7MK77.cjs → versionSetCommand-NVTRPVPM.cjs} +6 -6
- package/build/cjs/{versionSetCommand-RGR7MK77.cjs.map → versionSetCommand-NVTRPVPM.cjs.map} +1 -1
- package/build/cjs/{versionUnsetCommand-R7TOOG7J.cjs → versionUnsetCommand-SCDRYEJZ.cjs} +6 -6
- package/build/cjs/{versionUnsetCommand-R7TOOG7J.cjs.map → versionUnsetCommand-SCDRYEJZ.cjs.map} +1 -1
- package/build/esm/{chunk-6XRLZ4NI.js → chunk-LPJS5ZNF.js} +3 -3
- package/build/esm/{chunk-6XRLZ4NI.js.map → chunk-LPJS5ZNF.js.map} +1 -1
- package/build/{browser/handleGenerate-VWGGTJFP-BST3K5IL.js → esm/handleGenerate-YR4JL5YQ-6PD5RUWK.js} +6 -6
- package/build/{browser/handleGenerate-VWGGTJFP-BST3K5IL.js.map → esm/handleGenerate-YR4JL5YQ-6PD5RUWK.js.map} +1 -1
- package/build/esm/index.js +8 -8
- package/build/esm/index.js.map +1 -1
- package/build/{browser/siteDeployCommand-OTC7YJPE.js → esm/siteDeployCommand-IXZF67R5.js} +3 -3
- package/build/esm/{siteDeployCommand-OTC7YJPE.js.map → siteDeployCommand-IXZF67R5.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-FAWEUE7W.js → versionDeleteCommand-PYZGRY5B.js} +3 -3
- package/build/esm/{versionDeleteCommand-FAWEUE7W.js.map → versionDeleteCommand-PYZGRY5B.js.map} +1 -1
- package/build/{browser/versionGetCommand-KA3ON6B4.js → esm/versionGetCommand-XNSKVJFD.js} +3 -3
- package/build/esm/{versionGetCommand-KA3ON6B4.js.map → versionGetCommand-XNSKVJFD.js.map} +1 -1
- package/build/{browser/versionListCommand-W4EZAJFX.js → esm/versionListCommand-UJHOSVJG.js} +3 -3
- package/build/esm/{versionListCommand-W4EZAJFX.js.map → versionListCommand-UJHOSVJG.js.map} +1 -1
- package/build/{browser/versionSetCommand-NOLE7BFA.js → esm/versionSetCommand-XMSTHJ4Q.js} +3 -3
- package/build/esm/{versionSetCommand-NOLE7BFA.js.map → versionSetCommand-XMSTHJ4Q.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-ZPNPJYW4.js → versionUnsetCommand-MKZ46AR4.js} +3 -3
- package/build/esm/{versionUnsetCommand-ZPNPJYW4.js.map → versionUnsetCommand-MKZ46AR4.js.map} +1 -1
- package/package.json +5 -5
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;AAAA,OACtC;AAAA,MACA,UAAY,EAAA;AAAA,QACV,WAAa,EAAA,sDAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAW,EAAA,cAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,QACT,KAAO,E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AAA,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-VWGGTJFP.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.4\"}\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
|
+
{"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;AAAA,OACtC;AAAA,MACA,UAAY,EAAA;AAAA,QACV,WAAa,EAAA,sDAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAW,EAAA,cAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,QACT,KAAO,EAAA,OAAA;AAAA;AAAA,OAET;AAAA,MACA,QAAU,EAAA;AAAA,QACR,WAAa,EAAA,iCAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAW,EAAA,cAAA;AAAA,QACX,OAAS,EAAA,YAAA;AAAA,OACX;AAAA,MACA,WAAa,EAAA;AAAA,QACX,WAAa,EAAA,0CAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,MACA,iBAAmB,EAAA;AAAA,QACjB,WAAa,EAAA,sCAAA;AAAA,QACb,IAAM,EAAA,QAAA;AAAA,QACN,YAAc,EAAA,KAAA;AAAA,QACd,SAAA,EAAW,CAAC,cAAc,CAAA;AAAA,OAC5B;AAAA,MACA,IAAM,EAAA;AAA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ACV,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-YR4JL5YQ.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.5\"}\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,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkV2NDGUCJ_cjs = require('./chunk-V2NDGUCJ.cjs');
|
|
4
4
|
var chunkKN4OGPAB_cjs = require('./chunk-KN4OGPAB.cjs');
|
|
5
5
|
require('./chunk-EMMSS5I5.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -83,9 +83,9 @@ async function siteDeployCommand({
|
|
|
83
83
|
token,
|
|
84
84
|
tokenFile
|
|
85
85
|
}) {
|
|
86
|
-
const loadedToken = await
|
|
86
|
+
const loadedToken = await chunkV2NDGUCJ_cjs.loadToken(token, tokenFile);
|
|
87
87
|
const tokenProvider = () => loadedToken;
|
|
88
|
-
const clientCtx =
|
|
88
|
+
const clientCtx = chunkV2NDGUCJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
89
89
|
let siteVersion;
|
|
90
90
|
if (typeof selectedVersion === "string") {
|
|
91
91
|
siteVersion = selectedVersion;
|
|
@@ -102,7 +102,7 @@ async function siteDeployCommand({
|
|
|
102
102
|
const archive = archiver__default.default("zip").directory(directory, false);
|
|
103
103
|
logArchiveStats(archive);
|
|
104
104
|
consola.consola.start("Uploading site files");
|
|
105
|
-
await Promise.all([
|
|
105
|
+
await Promise.all([chunkV2NDGUCJ_cjs.third_party_applications_exports.uploadVersion(
|
|
106
106
|
clientCtx,
|
|
107
107
|
application,
|
|
108
108
|
siteVersion,
|
|
@@ -111,7 +111,7 @@ async function siteDeployCommand({
|
|
|
111
111
|
), archive.finalize()]);
|
|
112
112
|
consola.consola.success("Upload complete");
|
|
113
113
|
if (!uploadOnly) {
|
|
114
|
-
const website = await
|
|
114
|
+
const website = await chunkV2NDGUCJ_cjs.third_party_applications_exports.deployWebsite(clientCtx, application, {
|
|
115
115
|
version: siteVersion
|
|
116
116
|
});
|
|
117
117
|
consola.consola.success(`Deployed ${siteVersion} successfully`);
|
|
@@ -120,7 +120,7 @@ async function siteDeployCommand({
|
|
|
120
120
|
logSiteLink("View live site:", `https://${domain}`);
|
|
121
121
|
}
|
|
122
122
|
} else {
|
|
123
|
-
const website = await
|
|
123
|
+
const website = await chunkV2NDGUCJ_cjs.third_party_applications_exports.getWebsite(clientCtx, application);
|
|
124
124
|
const domain = website?.subdomains[0];
|
|
125
125
|
consola.consola.debug("Upload only mode enabled, skipping deployment");
|
|
126
126
|
if (domain != null) {
|
|
@@ -157,5 +157,5 @@ ${utils.colorize("green", link)}`,
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
module.exports = siteDeployCommand;
|
|
160
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
161
|
-
//# sourceMappingURL=siteDeployCommand-
|
|
160
|
+
//# sourceMappingURL=siteDeployCommand-HVWOT4OP.cjs.map
|
|
161
|
+
//# sourceMappingURL=siteDeployCommand-HVWOT4OP.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/autoVersion.ts","../../src/commands/site/deploy/siteDeployCommand.mts"],"names":["isValidSemver","ExitProcessError","promisify","exec","loadToken","createInternalClientContext","consola","path","fs","archiver","third_party_applications_exports","Readable","colorize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,eAAsB,WAAA,CAAY,YAAY,EAAI,EAAA;AAChD,EAAM,MAAA,CAAC,aAAa,WAAW,CAAA,GAAI,cAAc,EAAK,GAAA,CAAC,WAAW,IAAI,MAAA,CAAO,IAAI,SAAS,CAAA,CAAE,CAAC,C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AAA;AAAA,EAAOM,cAAA,CAAS,OAAS,EAAA,IAAI,CAAC,CAAA,CAAA;AAAA,IAC/C,KAAO,EAAA;AAAA,MACL,OAAS,EAAA,CAAA;AAAA,MACT,WAAa,EAAA,OAAA;AAAA,MACb,WAAa,EAAA,SAAA;AAAA,KACf;AAAA,GACD,CAAA,CAAA;AACH","file":"siteDeployCommand-UN2XO5OL.cjs","sourcesContent":["/*\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, isValidSemver } from \"@osdk/cli.common\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\n/**\n * Gets the version string using git describe. If the @param tagPrefix is empty, git describe will return the\n * latest tag (without any filtering) and if the tag starts with \"v\", it will be removed.\n * @param tagPrefix The prefix to use for matching against tags. Defaults to an empty string.\n * @returns A promise that resolves to the version string.\n * @throws An error if the version string is not SemVer compliant or if the version cannot be determined.\n */\nexport async function autoVersion(tagPrefix = \"\") {\n const [matchPrefix, prefixRegex] = tagPrefix !== \"\" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [undefined, new RegExp(`^v?`)];\n const gitVersion = await gitDescribe(matchPrefix);\n const version = gitVersion.trim().replace(prefixRegex, \"\");\n if (!isValidSemver(version)) {\n throw new ExitProcessError(2, `The version string ${version} is not SemVer compliant.`);\n }\n return version;\n}\nasync function gitDescribe(matchPrefix) {\n let gitVersion;\n try {\n const execAsync = promisify(exec);\n const {\n stdout\n } = await execAsync(`git describe --tags --first-parent --dirty${matchPrefix != null ? ` --match=\"${matchPrefix}*\"` : \"\"}`, {\n encoding: \"utf8\"\n });\n gitVersion = stdout;\n } catch (error) {\n if (error instanceof Error) {\n const errorMessage = error.message.toLowerCase();\n if (errorMessage.includes(\"not recognized\") || errorMessage.includes(\"command not found\") || errorMessage.includes(\"no such file or directory\")) {\n throw new ExitProcessError(2, \"Unable to determine auto version using git-describe as git is not installed or found in the PATH.\", `You can set up git and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: not a git repository\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: no names found, cannot describe anything.\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);\n }\n }\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);\n }\n return gitVersion;\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 { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport { autoVersion as findAutoVersion } from \"../../../util/autoVersion.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion.tagPrefix);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n consola.start(\"Uploading site files\");\n await Promise.all([thirdPartyApplications.uploadVersion(clientCtx, application, siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n if (!uploadOnly) {\n const website = await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version: siteVersion\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n const domain = website.subdomains[0];\n if (domain != null) {\n logSiteLink(\"View live site:\", `https://${domain}`);\n }\n } else {\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const domain = website?.subdomains[0];\n consola.debug(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n logSiteLink(\"Preview link:\", `https://${domain}/.system/preview?previewVersion=${siteVersion}`);\n }\n }\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.debug(`Zipped ${archiveStats.fileCount} files and ${archiveStats.bytes} bytes`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/util/autoVersion.ts","../../src/commands/site/deploy/siteDeployCommand.mts"],"names":["isValidSemver","ExitProcessError","promisify","exec","loadToken","createInternalClientContext","consola","path","fs","archiver","third_party_applications_exports","Readable","colorize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,eAAsB,WAAA,CAAY,YAAY,EAAI,EAAA;AAChD,EAAM,MAAA,CAAC,aAAa,WAAW,CAAA,GAAI,cAAc,EAAK,GAAA,CAAC,WAAW,IAAI,MAAA,CAAO,IAAI,SAAS,CAAA,CAAE,CAAC,CAAI,GAAA,CAAC,QAAW,IAAI,MAAA,CAAO,KAAK,CAAC,CAAA,CAAA;AAC9H,EAAM,MAAA,UAAA,GAAa,MAAM,WAAA,CAAY,WAAW,CAAA,CAAA;AAChD,EAAA,MAAM,UAAU,UAAW,CAAA,IAAA,EAAO,CAAA,OAAA,CAAQ,aAAa,EAAE,CAAA,CAAA;AACzD,EAAI,IAAA,CAACA,+BAAc,CAAA,OAAO,CAAG,EAAA;AAC3B,IAAA,MAAM,IAAIC,kCAAA,CAAiB,CAAG,EAAA,CAAA,mBAAA,EAAsB,OAAO,CAA2B,yBAAA,CAAA,CAAA,CAAA;AAAA,GACxF;AACA,EAAO,OAAA,OAAA,CAAA;AACT,CAAA;AACA,eAAe,YAAY,WAAa,EAAA;AACtC,EAAI,IAAA,UAAA,CAAA;AACJ,EAAI,IAAA;AACF,IAAM,MAAA,SAAA,GAAYC,eAAUC,kBAAI,CAAA,CAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAAA;AAAA,KACF,GAAI,MAAM,SAAA,CAAU,CAA6C,0CAAA,EAAA,WAAA,IAAe,OAAO,CAAa,UAAA,EAAA,WAAW,CAAO,EAAA,CAAA,GAAA,EAAE,CAAI,CAAA,EAAA;AAAA,MAC1H,QAAU,EAAA,MAAA;AAAA,KACX,CAAA,CAAA;AACD,IAAa,UAAA,G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S,EAAG,CAAA,UAAA;AAAA,KACrB,CAAA;AAAA,GACD,CAAA,CAAA;AACD,EAAQ,OAAA,CAAA,EAAA,CAAG,UAAU,MAAM;AACzB,IAAAA,eAAA,CAAQ,MAAM,CAAU,OAAA,EAAA,YAAA,CAAa,SAAS,CAAc,WAAA,EAAA,YAAA,CAAa,KAAK,CAAQ,MAAA,CAAA,CAAA,CAAA;AAAA,GACvF,CAAA,CAAA;AACH,CAAA;AACA,SAAS,WAAA,CAAY,OAAO,IAAM,EAAA;AAChC,EAAAA,eAAA,CAAQ,GAAI,CAAA;AAAA,IACV,OAAA,EAAS,GAAG,KAAK,CAAA;AAAA;AAAA,EAAOM,cAAA,CAAS,OAAS,EAAA,IAAI,CAAC,CAAA,CAAA;AAAA,IAC/C,KAAO,EAAA;AAAA,MACL,OAAS,EAAA,CAAA;AAAA,MACT,WAAa,EAAA,OAAA;AAAA,MACb,WAAa,EAAA,SAAA;AAAA,KACf;AAAA,GACD,CAAA,CAAA;AACH","file":"siteDeployCommand-HVWOT4OP.cjs","sourcesContent":["/*\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, isValidSemver } from \"@osdk/cli.common\";\nimport { exec } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\n/**\n * Gets the version string using git describe. If the @param tagPrefix is empty, git describe will return the\n * latest tag (without any filtering) and if the tag starts with \"v\", it will be removed.\n * @param tagPrefix The prefix to use for matching against tags. Defaults to an empty string.\n * @returns A promise that resolves to the version string.\n * @throws An error if the version string is not SemVer compliant or if the version cannot be determined.\n */\nexport async function autoVersion(tagPrefix = \"\") {\n const [matchPrefix, prefixRegex] = tagPrefix !== \"\" ? [tagPrefix, new RegExp(`^${tagPrefix}`)] : [undefined, new RegExp(`^v?`)];\n const gitVersion = await gitDescribe(matchPrefix);\n const version = gitVersion.trim().replace(prefixRegex, \"\");\n if (!isValidSemver(version)) {\n throw new ExitProcessError(2, `The version string ${version} is not SemVer compliant.`);\n }\n return version;\n}\nasync function gitDescribe(matchPrefix) {\n let gitVersion;\n try {\n const execAsync = promisify(exec);\n const {\n stdout\n } = await execAsync(`git describe --tags --first-parent --dirty${matchPrefix != null ? ` --match=\"${matchPrefix}*\"` : \"\"}`, {\n encoding: \"utf8\"\n });\n gitVersion = stdout;\n } catch (error) {\n if (error instanceof Error) {\n const errorMessage = error.message.toLowerCase();\n if (errorMessage.includes(\"not recognized\") || errorMessage.includes(\"command not found\") || errorMessage.includes(\"no such file or directory\")) {\n throw new ExitProcessError(2, \"Unable to determine auto version using git-describe as git is not installed or found in the PATH.\", `You can set up git and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: not a git repository\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as the current directory is not a git repository.`, `You can run the command in a git repository and try again or supply a --version option to set the version manually`);\n }\n if (errorMessage.includes(\"fatal: no names found, cannot describe anything.\")) {\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe as no matching tags were found.`, `You can create a tag matching the configured tag prefix and try again or supply a --version option to set the version manually`);\n }\n }\n throw new ExitProcessError(2, `Unable to determine auto version using git-describe: ${error}.`, `You can supply a --version option to set the version manually`);\n }\n return gitVersion;\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 { consola } from \"consola\";\nimport { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { ExitProcessError } from \"@osdk/cli.common\";\nimport archiver from \"archiver\";\nimport { colorize } from \"consola/utils\";\nimport * as fs from \"node:fs\";\nimport path from \"node:path\";\nimport { Readable } from \"node:stream\";\nimport { autoVersion as findAutoVersion } from \"../../../util/autoVersion.js\";\nimport { loadToken } from \"../../../util/token.js\";\nexport default async function siteDeployCommand({\n selectedVersion,\n application,\n foundryUrl,\n uploadOnly,\n directory,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n let siteVersion;\n if (typeof selectedVersion === \"string\") {\n siteVersion = selectedVersion;\n } else {\n siteVersion = await findAutoVersion(selectedVersion.tagPrefix);\n consola.info(`Auto version inferred next version to be: ${siteVersion}`);\n }\n consola.debug(`Using directory for site files: \"${path.resolve(directory)}`);\n const stat = await fs.promises.stat(directory);\n if (!stat.isDirectory()) {\n throw new ExitProcessError(2, \"Specified path exists but is not a directory\");\n }\n consola.start(\"Zipping site files\");\n const archive = archiver(\"zip\").directory(directory, false);\n logArchiveStats(archive);\n consola.start(\"Uploading site files\");\n await Promise.all([thirdPartyApplications.uploadVersion(clientCtx, application, siteVersion, Readable.toWeb(archive) // This cast is because the dom fetch doesn't align type wise with streams\n ), archive.finalize()]);\n consola.success(\"Upload complete\");\n if (!uploadOnly) {\n const website = await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version: siteVersion\n });\n consola.success(`Deployed ${siteVersion} successfully`);\n const domain = website.subdomains[0];\n if (domain != null) {\n logSiteLink(\"View live site:\", `https://${domain}`);\n }\n } else {\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const domain = website?.subdomains[0];\n consola.debug(\"Upload only mode enabled, skipping deployment\");\n if (domain != null) {\n logSiteLink(\"Preview link:\", `https://${domain}/.system/preview?previewVersion=${siteVersion}`);\n }\n }\n}\nfunction logArchiveStats(archive) {\n let archiveStats = {\n fileCount: 0,\n bytes: 0\n };\n archive.on(\"progress\", progress => {\n archiveStats = {\n fileCount: progress.entries.total,\n bytes: progress.fs.totalBytes\n };\n });\n archive.on(\"finish\", () => {\n consola.debug(`Zipped ${archiveStats.fileCount} files and ${archiveStats.bytes} bytes`);\n });\n}\nfunction logSiteLink(title, link) {\n consola.box({\n message: `${title}\\n\\n${colorize(\"green\", link)}`,\n style: {\n padding: 2,\n borderColor: \"green\",\n borderStyle: \"rounded\"\n }\n });\n}"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkV2NDGUCJ_cjs = require('./chunk-V2NDGUCJ.cjs');
|
|
5
5
|
require('./chunk-KN4OGPAB.cjs');
|
|
6
6
|
require('./chunk-EMMSS5I5.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
@@ -23,13 +23,13 @@ ${utils.colorize("bold", "This action cannot be undone.")}`, {
|
|
|
23
23
|
chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
|
|
24
24
|
}
|
|
25
25
|
consola.consola.start(`Deleting version ${version}`);
|
|
26
|
-
const loadedToken = await
|
|
26
|
+
const loadedToken = await chunkV2NDGUCJ_cjs.loadToken(token, tokenFile);
|
|
27
27
|
const tokenProvider = () => loadedToken;
|
|
28
|
-
const clientCtx =
|
|
29
|
-
await
|
|
28
|
+
const clientCtx = chunkV2NDGUCJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
29
|
+
await chunkV2NDGUCJ_cjs.third_party_applications_exports.deleteVersion(clientCtx, application, version);
|
|
30
30
|
consola.consola.success(`Deleted version ${version}`);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
module.exports = versionDeleteCommand;
|
|
34
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
35
|
-
//# sourceMappingURL=versionDeleteCommand-
|
|
34
|
+
//# sourceMappingURL=versionDeleteCommand-UIM5TVLN.cjs.map
|
|
35
|
+
//# sourceMappingURL=versionDeleteCommand-UIM5TVLN.cjs.map
|
package/build/cjs/{versionDeleteCommand-W3LXTLB6.cjs.map → versionDeleteCommand-UIM5TVLN.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":["consola","colorize","handlePromptCancel","loadToken","createInternalClientContext","third_party_applications_exports"],"mappings":";;;;;;;;;AAqBA,eAAO,oBAA4C,CAAA;AAAA,EACjD,OAAA;AAAA,EACA,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAA,MAAM,SAAY,GAAA,MAAMA,eAAQ,CAAA,MAAA,CAAO,+CAA+C,OAAO,CAAA;AAAA,EAAMC,cAAS,CAAA,MAAA,EAAQ,+BAA+B,CAAC,CAAI,CAAA,EAAA;AAAA,MACtJ,IAAM,EAAA,SAAA;AAAA,KACP,CAAA,CAAA;AACD,IAAAC,oCAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAQF,eAAA,CAAA,KAAA,CAAM,CAAoB,iBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAC3C,EAAA,MAAM,WAAc,GAAA,MAAMG,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,MAAMC,kDAAuB,CAAA,aAAA,CAAc,SAAW,EAAA,WAAA,EAAa,OAAO,CAAA,CAAA;AAC1E,EAAQL,eAAA,CAAA,OAAA,CAAQ,CAAmB,gBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAC9C","file":"versionDeleteCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/delete/versionDeleteCommand.mts"],"names":["consola","colorize","handlePromptCancel","loadToken","createInternalClientContext","third_party_applications_exports"],"mappings":";;;;;;;;;AAqBA,eAAO,oBAA4C,CAAA;AAAA,EACjD,OAAA;AAAA,EACA,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAA,MAAM,SAAY,GAAA,MAAMA,eAAQ,CAAA,MAAA,CAAO,+CAA+C,OAAO,CAAA;AAAA,EAAMC,cAAS,CAAA,MAAA,EAAQ,+BAA+B,CAAC,CAAI,CAAA,EAAA;AAAA,MACtJ,IAAM,EAAA,SAAA;AAAA,KACP,CAAA,CAAA;AACD,IAAAC,oCAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAQF,eAAA,CAAA,KAAA,CAAM,CAAoB,iBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAC3C,EAAA,MAAM,WAAc,GAAA,MAAMG,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,MAAMC,kDAAuB,CAAA,aAAA,CAAc,SAAW,EAAA,WAAA,EAAa,OAAO,CAAA,CAAA;AAC1E,EAAQL,eAAA,CAAA,OAAA,CAAQ,CAAmB,gBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAC9C","file":"versionDeleteCommand-UIM5TVLN.cjs","sourcesContent":["/*\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 { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionDeleteCommand({\n version,\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to delete the version ${version}?\\n${colorize(\"bold\", \"This action cannot be undone.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n consola.start(`Deleting version ${version}`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n await thirdPartyApplications.deleteVersion(clientCtx, application, version);\n consola.success(`Deleted version ${version}`);\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkV2NDGUCJ_cjs = require('./chunk-V2NDGUCJ.cjs');
|
|
4
4
|
require('./chunk-KN4OGPAB.cjs');
|
|
5
5
|
require('./chunk-EMMSS5I5.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -11,11 +11,11 @@ async function versionGetCommand({
|
|
|
11
11
|
token,
|
|
12
12
|
tokenFile
|
|
13
13
|
}) {
|
|
14
|
-
const loadedToken = await
|
|
14
|
+
const loadedToken = await chunkV2NDGUCJ_cjs.loadToken(token, tokenFile);
|
|
15
15
|
const tokenProvider = () => loadedToken;
|
|
16
|
-
const clientCtx =
|
|
16
|
+
const clientCtx = chunkV2NDGUCJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
17
17
|
consola.consola.start("Getting live version");
|
|
18
|
-
const website = await
|
|
18
|
+
const website = await chunkV2NDGUCJ_cjs.third_party_applications_exports.getWebsite(clientCtx, application);
|
|
19
19
|
const deployedVersion = website?.deployedVersion;
|
|
20
20
|
if (!deployedVersion) {
|
|
21
21
|
consola.consola.info("No live site version set");
|
|
@@ -25,5 +25,5 @@ async function versionGetCommand({
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
module.exports = versionGetCommand;
|
|
28
|
-
//# sourceMappingURL=versionGetCommand-
|
|
29
|
-
//# sourceMappingURL=versionGetCommand-
|
|
28
|
+
//# sourceMappingURL=versionGetCommand-NL3SPFFI.cjs.map
|
|
29
|
+
//# sourceMappingURL=versionGetCommand-NL3SPFFI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":["loadToken","createInternalClientContext","consola","third_party_applications_exports"],"mappings":";;;;;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAMA,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAAC,eAAA,CAAQ,MAAM,sBAAsB,CAAA,CAAA;AACpC,EAAA,MAAM,OAAU,GAAA,MAAMC,kDAAuB,CAAA,UAAA,CAAW,WAAW,WAAW,CAAA,CAAA;AAC9E,EAAA,MAAM,kBAAkB,OAAS,EAAA,eAAA,CAAA;AACjC,EAAA,IAAI,CAAC,eAAiB,EAAA;AACpB,IAAAD,eAAA,CAAQ,KAAK,0BAA0B,CAAA,CAAA;AAAA,GAClC,MAAA;AACL,IAAQA,eAAA,CAAA,OAAA,CAAQ,CAAwB,qBAAA,EAAA,eAAe,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3D;AACF","file":"versionGetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/get/versionGetCommand.mts"],"names":["loadToken","createInternalClientContext","consola","third_party_applications_exports"],"mappings":";;;;;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAMA,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAAC,eAAA,CAAQ,MAAM,sBAAsB,CAAA,CAAA;AACpC,EAAA,MAAM,OAAU,GAAA,MAAMC,kDAAuB,CAAA,UAAA,CAAW,WAAW,WAAW,CAAA,CAAA;AAC9E,EAAA,MAAM,kBAAkB,OAAS,EAAA,eAAA,CAAA;AACjC,EAAA,IAAI,CAAC,eAAiB,EAAA;AACpB,IAAAD,eAAA,CAAQ,KAAK,0BAA0B,CAAA,CAAA;AAAA,GAClC,MAAA;AACL,IAAQA,eAAA,CAAA,OAAA,CAAQ,CAAwB,qBAAA,EAAA,eAAe,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3D;AACF","file":"versionGetCommand-NL3SPFFI.cjs","sourcesContent":["/*\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 { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionGetCommand({\n foundryUrl,\n application,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Getting live version\");\n const website = await thirdPartyApplications.getWebsite(clientCtx, application);\n const deployedVersion = website?.deployedVersion;\n if (!deployedVersion) {\n consola.info(\"No live site version set\");\n } else {\n consola.success(`Live site version is ${deployedVersion}`);\n }\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkV2NDGUCJ_cjs = require('./chunk-V2NDGUCJ.cjs');
|
|
4
4
|
require('./chunk-KN4OGPAB.cjs');
|
|
5
5
|
require('./chunk-EMMSS5I5.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -12,11 +12,11 @@ async function versionListCommand({
|
|
|
12
12
|
token,
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
|
-
const loadedToken = await
|
|
15
|
+
const loadedToken = await chunkV2NDGUCJ_cjs.loadToken(token, tokenFile);
|
|
16
16
|
const tokenProvider = () => loadedToken;
|
|
17
|
-
const clientCtx =
|
|
17
|
+
const clientCtx = chunkV2NDGUCJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
18
18
|
consola.consola.start("Fetching versions & deployed version");
|
|
19
|
-
const [versions, website] = await Promise.all([
|
|
19
|
+
const [versions, website] = await Promise.all([chunkV2NDGUCJ_cjs.third_party_applications_exports.listVersions(clientCtx, application), chunkV2NDGUCJ_cjs.third_party_applications_exports.getWebsite(clientCtx, application)]);
|
|
20
20
|
if (versions.data.length === 0) {
|
|
21
21
|
consola.consola.info("No site versions found");
|
|
22
22
|
return;
|
|
@@ -30,5 +30,5 @@ async function versionListCommand({
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
module.exports = versionListCommand;
|
|
33
|
-
//# sourceMappingURL=versionListCommand-
|
|
34
|
-
//# sourceMappingURL=versionListCommand-
|
|
33
|
+
//# sourceMappingURL=versionListCommand-67BK5V6Y.cjs.map
|
|
34
|
+
//# sourceMappingURL=versionListCommand-67BK5V6Y.cjs.map
|
package/build/cjs/{versionListCommand-OEZ4IV7I.cjs.map → versionListCommand-67BK5V6Y.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":["loadToken","createInternalClientContext","consola","third_party_applications_exports","colorize"],"mappings":";;;;;;;;AAoBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAMA,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAAC,eAAA,CAAQ,MAAM,sCAAsC,CAAA,CAAA;AACpD,EAAA,MAAM,CAAC,QAAU,EAAA,OAAO,IAAI,MAAM,OAAA,CAAQ,IAAI,CAACC,kDAAA,CAAuB,YAAa,CAAA,SAAA,EAAW,WAAW,CAAG,EAAAA,kDAAA,CAAuB,WAAW,SAAW,EAAA,WAAW,CAAC,CAAC,CAAA,CAAA;AACtK,EAAI,IAAA,QAAA,CAAS,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC9B,IAAAD,eAAA,CAAQ,KAAK,wBAAwB,CAAA,CAAA;AACrC,IAAA,OAAA;AAAA,GACF;AACA,EAAAA,eAAA,CAAQ,QAAQ,iBAAiB,CAAA,CAAA;AACjC,EAAM,MAAA,MAAA,GAAS,MAAM,OAAO,QAAQ,CAAA,CAAA;AACpC,EAAA,MAAM,iBAAiB,MAAO,CAAA,KAAA,CAAM,QAAS,CAAA,IAAA,CAAK,IAAI,CAAK,CAAA,KAAA,CAAA,CAAE,OAAO,CAAA,CAAE,OAAO,CAAK,CAAA,KAAA,MAAA,CAAO,KAAM,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA;AAClG,EAAA,KAAA,MAAW,WAAW,cAAgB,EAAA;AACpC,IAAAA,eAAA,CAAQ,GAAI,CAAA,CAAA,MAAA,EAAS,OAAO,CAAA,EAAG,SAAS,eAAmB,IAAA,OAAA,KAAY,OAAS,EAAA,eAAA,GAAkBE,cAAS,CAAA,OAAA,EAAS,CAAa,WAAA,CAAA,CAAA,GAAI,EAAE,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3I;AACF","file":"versionListCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/list/versionListCommand.mts"],"names":["loadToken","createInternalClientContext","consola","third_party_applications_exports","colorize"],"mappings":";;;;;;;;AAoBA,eAAO,kBAA0C,CAAA;AAAA,EAC/C,UAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,MAAM,WAAc,GAAA,MAAMA,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAAC,eAAA,CAAQ,MAAM,sCAAsC,CAAA,CAAA;AACpD,EAAA,MAAM,CAAC,QAAU,EAAA,OAAO,IAAI,MAAM,OAAA,CAAQ,IAAI,CAACC,kDAAA,CAAuB,YAAa,CAAA,SAAA,EAAW,WAAW,CAAG,EAAAA,kDAAA,CAAuB,WAAW,SAAW,EAAA,WAAW,CAAC,CAAC,CAAA,CAAA;AACtK,EAAI,IAAA,QAAA,CAAS,IAAK,CAAA,MAAA,KAAW,CAAG,EAAA;AAC9B,IAAAD,eAAA,CAAQ,KAAK,wBAAwB,CAAA,CAAA;AACrC,IAAA,OAAA;AAAA,GACF;AACA,EAAAA,eAAA,CAAQ,QAAQ,iBAAiB,CAAA,CAAA;AACjC,EAAM,MAAA,MAAA,GAAS,MAAM,OAAO,QAAQ,CAAA,CAAA;AACpC,EAAA,MAAM,iBAAiB,MAAO,CAAA,KAAA,CAAM,QAAS,CAAA,IAAA,CAAK,IAAI,CAAK,CAAA,KAAA,CAAA,CAAE,OAAO,CAAA,CAAE,OAAO,CAAK,CAAA,KAAA,MAAA,CAAO,KAAM,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA;AAClG,EAAA,KAAA,MAAW,WAAW,cAAgB,EAAA;AACpC,IAAAA,eAAA,CAAQ,GAAI,CAAA,CAAA,MAAA,EAAS,OAAO,CAAA,EAAG,SAAS,eAAmB,IAAA,OAAA,KAAY,OAAS,EAAA,eAAA,GAAkBE,cAAS,CAAA,OAAA,EAAS,CAAa,WAAA,CAAA,CAAA,GAAI,EAAE,CAAE,CAAA,CAAA,CAAA;AAAA,GAC3I;AACF","file":"versionListCommand-67BK5V6Y.cjs","sourcesContent":["/*\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 { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { consola } from \"consola\";\nimport { colorize } from \"consola/utils\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionListCommand({\n foundryUrl,\n application,\n token,\n tokenFile\n}) {\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Fetching versions & deployed version\");\n const [versions, website] = await Promise.all([thirdPartyApplications.listVersions(clientCtx, application), thirdPartyApplications.getWebsite(clientCtx, application)]);\n if (versions.data.length === 0) {\n consola.info(\"No site versions found\");\n return;\n }\n consola.success(\"Found versions:\");\n const semver = await import(\"semver\");\n const sortedVersions = semver.rsort(versions.data.map(v => v.version).filter(v => semver.valid(v)));\n for (const version of sortedVersions) {\n consola.log(` - ${version}${website?.deployedVersion && version === website?.deployedVersion ? colorize(\"green\", ` (deployed)`) : \"\"}`);\n }\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkV2NDGUCJ_cjs = require('./chunk-V2NDGUCJ.cjs');
|
|
4
4
|
require('./chunk-KN4OGPAB.cjs');
|
|
5
5
|
require('./chunk-EMMSS5I5.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
@@ -13,11 +13,11 @@ async function versionSetCommand({
|
|
|
13
13
|
tokenFile
|
|
14
14
|
}) {
|
|
15
15
|
consola.consola.start(`Setting live version`);
|
|
16
|
-
const loadedToken = await
|
|
16
|
+
const loadedToken = await chunkV2NDGUCJ_cjs.loadToken(token, tokenFile);
|
|
17
17
|
const tokenProvider = () => loadedToken;
|
|
18
|
-
const clientCtx =
|
|
18
|
+
const clientCtx = chunkV2NDGUCJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
19
19
|
if (version) {
|
|
20
|
-
await
|
|
20
|
+
await chunkV2NDGUCJ_cjs.third_party_applications_exports.deployWebsite(clientCtx, application, {
|
|
21
21
|
version
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -25,5 +25,5 @@ async function versionSetCommand({
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
module.exports = versionSetCommand;
|
|
28
|
-
//# sourceMappingURL=versionSetCommand-
|
|
29
|
-
//# sourceMappingURL=versionSetCommand-
|
|
28
|
+
//# sourceMappingURL=versionSetCommand-NVTRPVPM.cjs.map
|
|
29
|
+
//# sourceMappingURL=versionSetCommand-NVTRPVPM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":["consola","loadToken","createInternalClientContext","third_party_applications_exports"],"mappings":";;;;;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,OAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAAA,eAAA,CAAQ,MAAM,CAAsB,oBAAA,CAAA,CAAA,CAAA;AACpC,EAAA,MAAM,WAAc,GAAA,MAAMC,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,IAAI,OAAS,EAAA;AACX,IAAM,MAAAC,kDAAA,CAAuB,aAAc,CAAA,SAAA,EAAW,WAAa,EAAA;AAAA,MACjE,OAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACA,EAAQH,eAAA,CAAA,OAAA,CAAQ,CAAuB,oBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAClD","file":"versionSetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/set/versionSetCommand.mts"],"names":["consola","loadToken","createInternalClientContext","third_party_applications_exports"],"mappings":";;;;;;;AAmBA,eAAO,iBAAyC,CAAA;AAAA,EAC9C,OAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAAA,eAAA,CAAQ,MAAM,CAAsB,oBAAA,CAAA,CAAA,CAAA;AACpC,EAAA,MAAM,WAAc,GAAA,MAAMC,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAA,IAAI,OAAS,EAAA;AACX,IAAM,MAAAC,kDAAA,CAAuB,aAAc,CAAA,SAAA,EAAW,WAAa,EAAA;AAAA,MACjE,OAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACA,EAAQH,eAAA,CAAA,OAAA,CAAQ,CAAuB,oBAAA,EAAA,OAAO,CAAE,CAAA,CAAA,CAAA;AAClD","file":"versionSetCommand-NVTRPVPM.cjs","sourcesContent":["/*\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 { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionSetCommand({\n version,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n consola.start(`Setting live version`);\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n if (version) {\n await thirdPartyApplications.deployWebsite(clientCtx, application, {\n version\n });\n }\n consola.success(`Set live version to ${version}`);\n}"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkDQYIDDJN_cjs = require('./chunk-DQYIDDJN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkV2NDGUCJ_cjs = require('./chunk-V2NDGUCJ.cjs');
|
|
5
5
|
require('./chunk-KN4OGPAB.cjs');
|
|
6
6
|
require('./chunk-EMMSS5I5.cjs');
|
|
7
7
|
var consola = require('consola');
|
|
@@ -21,14 +21,14 @@ ${utils.colorize("bold", "Your site will no longer be accessible until a new liv
|
|
|
21
21
|
});
|
|
22
22
|
chunkDQYIDDJN_cjs.handlePromptCancel(confirmed);
|
|
23
23
|
}
|
|
24
|
-
const loadedToken = await
|
|
24
|
+
const loadedToken = await chunkV2NDGUCJ_cjs.loadToken(token, tokenFile);
|
|
25
25
|
const tokenProvider = () => loadedToken;
|
|
26
|
-
const clientCtx =
|
|
26
|
+
const clientCtx = chunkV2NDGUCJ_cjs.createInternalClientContext(foundryUrl, tokenProvider);
|
|
27
27
|
consola.consola.start("Clearing live site version");
|
|
28
|
-
await
|
|
28
|
+
await chunkV2NDGUCJ_cjs.third_party_applications_exports.undeployWebsite(clientCtx, application);
|
|
29
29
|
consola.consola.success("Cleared live site version");
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
module.exports = versionUnsetCommand;
|
|
33
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
34
|
-
//# sourceMappingURL=versionUnsetCommand-
|
|
33
|
+
//# sourceMappingURL=versionUnsetCommand-SCDRYEJZ.cjs.map
|
|
34
|
+
//# sourceMappingURL=versionUnsetCommand-SCDRYEJZ.cjs.map
|
package/build/cjs/{versionUnsetCommand-R7TOOG7J.cjs.map → versionUnsetCommand-SCDRYEJZ.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":["consola","colorize","handlePromptCancel","loadToken","createInternalClientContext","third_party_applications_exports"],"mappings":";;;;;;;;;AAqBA,eAAO,mBAA2C,CAAA;AAAA,EAChD,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAM,MAAA,SAAA,GAAY,MAAMA,eAAA,CAAQ,MAAO,CAAA,CAAA;AAAA,EAA0DC,cAAS,CAAA,MAAA,EAAQ,8EAA8E,CAAC,CAAI,CAAA,EAAA;AAAA,MACnM,IAAM,EAAA,SAAA;AAAA,KACP,CAAA,CAAA;AACD,IAAAC,oCAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAA,MAAM,WAAc,GAAA,MAAMC,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAAJ,eAAA,CAAQ,MAAM,4BAA4B,CAAA,CAAA;AAC1C,EAAM,MAAAK,kDAAA,CAAuB,eAAgB,CAAA,SAAA,EAAW,WAAW,CAAA,CAAA;AACnE,EAAAL,eAAA,CAAQ,QAAQ,2BAA2B,CAAA,CAAA;AAC7C","file":"versionUnsetCommand-
|
|
1
|
+
{"version":3,"sources":["../../src/commands/site/version/unset/versionUnsetCommand.mts"],"names":["consola","colorize","handlePromptCancel","loadToken","createInternalClientContext","third_party_applications_exports"],"mappings":";;;;;;;;;AAqBA,eAAO,mBAA2C,CAAA;AAAA,EAChD,GAAA;AAAA,EACA,WAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA;AACF,CAAG,EAAA;AACD,EAAA,IAAI,CAAC,GAAK,EAAA;AACR,IAAM,MAAA,SAAA,GAAY,MAAMA,eAAA,CAAQ,MAAO,CAAA,CAAA;AAAA,EAA0DC,cAAS,CAAA,MAAA,EAAQ,8EAA8E,CAAC,CAAI,CAAA,EAAA;AAAA,MACnM,IAAM,EAAA,SAAA;AAAA,KACP,CAAA,CAAA;AACD,IAAAC,oCAAA,CAAmB,SAAS,CAAA,CAAA;AAAA,GAC9B;AACA,EAAA,MAAM,WAAc,GAAA,MAAMC,2BAAU,CAAA,KAAA,EAAO,SAAS,CAAA,CAAA;AACpD,EAAA,MAAM,gBAAgB,MAAM,WAAA,CAAA;AAC5B,EAAM,MAAA,SAAA,GAAYC,6CAA4B,CAAA,UAAA,EAAY,aAAa,CAAA,CAAA;AACvE,EAAAJ,eAAA,CAAQ,MAAM,4BAA4B,CAAA,CAAA;AAC1C,EAAM,MAAAK,kDAAA,CAAuB,eAAgB,CAAA,SAAA,EAAW,WAAW,CAAA,CAAA;AACnE,EAAAL,eAAA,CAAQ,QAAQ,2BAA2B,CAAA,CAAA;AAC7C","file":"versionUnsetCommand-SCDRYEJZ.cjs","sourcesContent":["/*\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 { createInternalClientContext, thirdPartyApplications } from \"#net\";\nimport { colorize } from \"consola/utils\";\nimport { handlePromptCancel } from \"../../../../consola/handlePromptCancel.js\";\nimport { loadToken } from \"../../../../util/token.js\";\nexport default async function versionUnsetCommand({\n yes,\n application,\n foundryUrl,\n token,\n tokenFile\n}) {\n if (!yes) {\n const confirmed = await consola.prompt(`Are you sure you want to clear the live site version?\\n${colorize(\"bold\", \"Your site will no longer be accessible until a new live site version is set.\")}`, {\n type: \"confirm\"\n });\n handlePromptCancel(confirmed);\n }\n const loadedToken = await loadToken(token, tokenFile);\n const tokenProvider = () => loadedToken;\n const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);\n consola.start(\"Clearing live site version\");\n await thirdPartyApplications.undeployWebsite(clientCtx, application);\n consola.success(\"Cleared live site version\");\n}"]}
|
|
@@ -25,7 +25,7 @@ __export(third_party_applications_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
// src/net/UserAgent.ts
|
|
28
|
-
var USER_AGENT = `osdk-cli/${"0.23.
|
|
28
|
+
var USER_AGENT = `osdk-cli/${"0.23.5"}`;
|
|
29
29
|
|
|
30
30
|
// src/net/createFetch.mts
|
|
31
31
|
function createFetch(tokenProvider, fetchFn = fetch) {
|
|
@@ -195,5 +195,5 @@ function isJWT(token) {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
export { createInternalClientContext, loadToken, third_party_applications_exports };
|
|
198
|
-
//# sourceMappingURL=chunk-
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
198
|
+
//# sourceMappingURL=chunk-LPJS5ZNF.js.map
|
|
199
|
+
//# sourceMappingURL=chunk-LPJS5ZNF.js.map
|