@cimplify/cli 0.15.2 → 0.15.3
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/dist/{chunk-MXYUAJEW.mjs → chunk-2MKZKUVH.mjs} +5 -1
- package/dist/{chunk-GRR5U2M5.mjs → chunk-3RPR33MO.mjs} +1 -1
- package/dist/{chunk-WEAB6HHQ.mjs → chunk-LJEKKFC7.mjs} +2 -2
- package/dist/{chunk-A6WHBSXZ.mjs → chunk-LZEG3FEY.mjs} +10 -8
- package/dist/{chunk-NK6VC264.mjs → chunk-O2TO2J4I.mjs} +1 -1
- package/dist/{chunk-F2UI225N.mjs → chunk-OLZKNUMK.mjs} +1 -1
- package/dist/{chunk-KN2YSKXZ.mjs → chunk-UTD34C2H.mjs} +14 -4
- package/dist/{deploy-JE6TUYCL.mjs → deploy-STWZ3OSM.mjs} +8 -8
- package/dist/{dev-V7JSUVOI.mjs → dev-7O65HY6C.mjs} +2 -2
- package/dist/dispatcher.mjs +16 -16
- package/dist/{doctor-HFB4IBYK.mjs → doctor-3RW3OGZJ.mjs} +4 -3
- package/dist/{domains-BZKGIDF4.mjs → domains-FTNK4IKY.mjs} +1 -1
- package/dist/{env-FZNXKLGL.mjs → env-TNCYUAMT.mjs} +1 -1
- package/dist/{explain-O5AC73EE.mjs → explain-DLRUUCNS.mjs} +1 -1
- package/dist/{introspect-2NGESQZE.mjs → introspect-RC265ACF.mjs} +4 -3
- package/dist/{link-4NM2QMI5.mjs → link-76Z6V6CJ.mjs} +2 -1
- package/dist/{logs-36BLYJHJ.mjs → logs-TNDM4RFE.mjs} +1 -1
- package/dist/{projects-4XRNHJAH.mjs → projects-YL4T24VV.mjs} +5 -3
- package/dist/{repo-X3KZ5R64.mjs → repo-UUT3AZ3L.mjs} +3 -3
- package/dist/{rollback-WCRWXSE3.mjs → rollback-47VQ4HJK.mjs} +2 -2
- package/dist/{status-VA326DWD.mjs → status-TWPOMWNA.mjs} +1 -1
- package/dist/{update-YYOTN7MG.mjs → update-FLY46XI3.mjs} +1 -1
- package/package.json +1 -1
|
@@ -36,14 +36,18 @@ var SECRET_MASK = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
|
36
36
|
var PUBLIC_ENV_PREFIX = "NEXT_PUBLIC_";
|
|
37
37
|
var REPO_PROVIDER = {
|
|
38
38
|
FREESTYLE: "freestyle",
|
|
39
|
+
CODE_STORAGE: "code_storage",
|
|
39
40
|
GITHUB: "github",
|
|
40
41
|
GITEA: "gitea",
|
|
41
42
|
EXTERNAL: "external"
|
|
42
43
|
};
|
|
44
|
+
function isManagedRepoProvider(provider) {
|
|
45
|
+
return provider === REPO_PROVIDER.FREESTYLE || provider === REPO_PROVIDER.CODE_STORAGE;
|
|
46
|
+
}
|
|
43
47
|
var REPO_PROVIDER_VALUES = new Set(Object.values(REPO_PROVIDER));
|
|
44
48
|
var TOKEN_PURPOSE = {
|
|
45
49
|
BUILD: "build",
|
|
46
50
|
EDITOR: "editor"
|
|
47
51
|
};
|
|
48
52
|
|
|
49
|
-
export { DEPLOYMENT_STATUS, DEPLOY_TRIGGER, DOMAIN_TYPE, ENV_SCOPE, PUBLIC_ENV_PREFIX, REPO_PROVIDER, REPO_PROVIDER_VALUES, SECRET_MASK, TERMINAL_DEPLOYMENT_STATUSES, TOKEN_PURPOSE };
|
|
53
|
+
export { DEPLOYMENT_STATUS, DEPLOY_TRIGGER, DOMAIN_TYPE, ENV_SCOPE, PUBLIC_ENV_PREFIX, REPO_PROVIDER, REPO_PROVIDER_VALUES, SECRET_MASK, TERMINAL_DEPLOYMENT_STATUSES, TOKEN_PURPOSE, isManagedRepoProvider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseEnvFile } from './chunk-I2UP7YTG.mjs';
|
|
3
|
-
import { package_default } from './chunk-
|
|
4
|
-
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-
|
|
3
|
+
import { package_default } from './chunk-3RPR33MO.mjs';
|
|
4
|
+
import { gitDetectRoot, gitCurrentBranch, gitCurrentSha, gitStatusPorcelain } from './chunk-UTD34C2H.mjs';
|
|
5
5
|
import { parseArgs } from './chunk-5KYR6WJB.mjs';
|
|
6
6
|
import { readAuthOrNull, readProjectLinkOrNull, readProjectState } from './chunk-MLE4MVYC.mjs';
|
|
7
7
|
import { bold, dim, yellow, green, info, result, red } from './chunk-3QUK5BPY.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { promptYesNo } from './chunk-TH4XENKH.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { gitRemoteHead, managedProviderForHost } from './chunk-UTD34C2H.mjs';
|
|
4
|
+
import { TOKEN_PURPOSE, REPO_PROVIDER, isManagedRepoProvider, REPO_PROVIDER_VALUES } from './chunk-2MKZKUVH.mjs';
|
|
5
5
|
import { parseArgs, flagString, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
6
6
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
7
7
|
import { readAuth, readProjectLink } from './chunk-MLE4MVYC.mjs';
|
|
@@ -52,7 +52,8 @@ function resolveProvider(value, fallback) {
|
|
|
52
52
|
function detectProviderFromUrl(url) {
|
|
53
53
|
try {
|
|
54
54
|
const parsed = new URL(url);
|
|
55
|
-
|
|
55
|
+
const managed = managedProviderForHost(parsed.hostname);
|
|
56
|
+
if (managed) return managed;
|
|
56
57
|
if (parsed.hostname === "github.com" || parsed.hostname.endsWith(".github.com")) {
|
|
57
58
|
return REPO_PROVIDER.GITHUB;
|
|
58
59
|
}
|
|
@@ -122,11 +123,12 @@ async function printCloneUrl(client, businessId, projectId) {
|
|
|
122
123
|
`);
|
|
123
124
|
}
|
|
124
125
|
async function provisionRepo(client, businessId, projectId, args) {
|
|
125
|
-
const
|
|
126
|
-
|
|
126
|
+
const requested = flagString(args, FLAG_PROVIDER);
|
|
127
|
+
const provider = requested === void 0 ? void 0 : resolveProvider(requested, REPO_PROVIDER.CODE_STORAGE);
|
|
128
|
+
if (provider !== void 0 && !isManagedRepoProvider(provider)) {
|
|
127
129
|
throw new CliError(
|
|
128
130
|
CLI_ERROR_CODE.INVALID_INPUT,
|
|
129
|
-
`Provisioning
|
|
131
|
+
`Provisioning creates a Cimplify-managed repo. Use \`cimplify repo connect\` for ${provider}.`
|
|
130
132
|
);
|
|
131
133
|
}
|
|
132
134
|
const body = {
|
|
@@ -148,7 +150,7 @@ async function connectRepo(client, businessId, projectId, args) {
|
|
|
148
150
|
);
|
|
149
151
|
}
|
|
150
152
|
const provider = resolveProvider(flagString(args, FLAG_PROVIDER), detectProviderFromUrl(remoteUrl));
|
|
151
|
-
if (provider
|
|
153
|
+
if (isManagedRepoProvider(provider)) {
|
|
152
154
|
throw new CliError(
|
|
153
155
|
CLI_ERROR_CODE.INVALID_INPUT,
|
|
154
156
|
"That URL points at Cimplify's managed Git host \u2014 use `cimplify repo provision` instead."
|
|
@@ -181,7 +183,7 @@ async function repoInfo(client, businessId, projectId) {
|
|
|
181
183
|
}
|
|
182
184
|
async function resolveRemoteHead(client, businessId, projectId, repo) {
|
|
183
185
|
try {
|
|
184
|
-
const url = repo.provider
|
|
186
|
+
const url = isManagedRepoProvider(repo.provider) ? (await fetchCloneToken(client, businessId, projectId)).clone_url : repo.remote_url;
|
|
185
187
|
return await gitRemoteHead(process.cwd(), url, repo.default_branch);
|
|
186
188
|
} catch {
|
|
187
189
|
return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { TERMINAL_DEPLOYMENT_STATUSES, DEPLOYMENT_STATUS } from './chunk-
|
|
2
|
+
import { TERMINAL_DEPLOYMENT_STATUSES, DEPLOYMENT_STATUS } from './chunk-2MKZKUVH.mjs';
|
|
3
3
|
import { dim, CliError, CLI_ERROR_CODE, failure, success, isJsonMode } from './chunk-3QUK5BPY.mjs';
|
|
4
4
|
|
|
5
5
|
// src/progress.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseEnvFile, formatEnvFile } from './chunk-I2UP7YTG.mjs';
|
|
3
|
-
import { ENV_SCOPE, PUBLIC_ENV_PREFIX } from './chunk-
|
|
3
|
+
import { ENV_SCOPE, PUBLIC_ENV_PREFIX } from './chunk-2MKZKUVH.mjs';
|
|
4
4
|
import { parseArgs, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
5
5
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
6
6
|
import { readAuth, readProjectLink } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { REPO_PROVIDER } from './chunk-2MKZKUVH.mjs';
|
|
2
3
|
import { CliError, CLI_ERROR_CODE } from './chunk-3QUK5BPY.mjs';
|
|
3
4
|
import { spawn } from 'child_process';
|
|
4
5
|
|
|
@@ -81,13 +82,22 @@ async function gitPushToUrl(cwd, url, branch) {
|
|
|
81
82
|
await runGitOk([...ARGS_PUSH, url, branch], cwd);
|
|
82
83
|
}
|
|
83
84
|
var FREESTYLE_GIT_HOST = "git.freestyle.sh";
|
|
84
|
-
|
|
85
|
+
var CODE_STORAGE_GIT_HOST_SUFFIX = ".code.storage";
|
|
86
|
+
function managedProviderForHost(hostname) {
|
|
87
|
+
if (hostname === FREESTYLE_GIT_HOST) return REPO_PROVIDER.FREESTYLE;
|
|
88
|
+
const org = hostname.slice(0, -CODE_STORAGE_GIT_HOST_SUFFIX.length);
|
|
89
|
+
if (hostname.endsWith(CODE_STORAGE_GIT_HOST_SUFFIX) && org !== "" && !org.includes(".")) {
|
|
90
|
+
return REPO_PROVIDER.CODE_STORAGE;
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function isManagedRemote(url) {
|
|
85
95
|
if (!url) return false;
|
|
86
96
|
try {
|
|
87
|
-
return new URL(url).hostname
|
|
97
|
+
return managedProviderForHost(new URL(url).hostname) !== null;
|
|
88
98
|
} catch {
|
|
89
|
-
return
|
|
99
|
+
return false;
|
|
90
100
|
}
|
|
91
101
|
}
|
|
92
102
|
|
|
93
|
-
export { gitAddRemote, gitCurrentBranch, gitCurrentSha, gitDetectRoot, gitGetRemoteUrl, gitPush, gitPushToUrl, gitRemoteHead, gitStatusPorcelain,
|
|
103
|
+
export { gitAddRemote, gitCurrentBranch, gitCurrentSha, gitDetectRoot, gitGetRemoteUrl, gitPush, gitPushToUrl, gitRemoteHead, gitStatusPorcelain, isManagedRemote, managedProviderForHost };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { detectPackageManager } from './chunk-
|
|
3
|
-
import { fetchRepoRecord, fetchCloneToken } from './chunk-
|
|
4
|
-
import { pollDeployment } from './chunk-
|
|
2
|
+
import { detectPackageManager } from './chunk-OLZKNUMK.mjs';
|
|
3
|
+
import { fetchRepoRecord, fetchCloneToken } from './chunk-LZEG3FEY.mjs';
|
|
4
|
+
import { pollDeployment } from './chunk-O2TO2J4I.mjs';
|
|
5
5
|
import './chunk-I2UP7YTG.mjs';
|
|
6
6
|
import { promptYesNo } from './chunk-TH4XENKH.mjs';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { isManagedRemote, gitDetectRoot, gitStatusPorcelain, gitCurrentBranch, gitCurrentSha, gitGetRemoteUrl, gitPushToUrl, gitPush } from './chunk-UTD34C2H.mjs';
|
|
8
|
+
import { isManagedRepoProvider, ENV_SCOPE, DEPLOY_TRIGGER, DEPLOYMENT_STATUS, TOKEN_PURPOSE } from './chunk-2MKZKUVH.mjs';
|
|
9
9
|
import { parseArgs, flagBool, flagString } from './chunk-5KYR6WJB.mjs';
|
|
10
10
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
11
11
|
import { readAuth, readProjectLink, writeProjectState } from './chunk-MLE4MVYC.mjs';
|
|
@@ -90,11 +90,11 @@ Or deploy anyway with --${FLAG_SKIP_ENV_CHECK}.`
|
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
function resolvePushStrategy(originUrl, linkRemoteUrl, repo) {
|
|
93
|
-
if (
|
|
93
|
+
if (isManagedRemote(originUrl) || isManagedRemote(linkRemoteUrl)) {
|
|
94
94
|
return { kind: "managed" };
|
|
95
95
|
}
|
|
96
96
|
if (repo) {
|
|
97
|
-
if (repo.provider
|
|
97
|
+
if (isManagedRepoProvider(repo.provider) || isManagedRemote(repo.remote_url)) {
|
|
98
98
|
return { kind: "managed" };
|
|
99
99
|
}
|
|
100
100
|
if (!originUrl) {
|
|
@@ -117,7 +117,7 @@ Then re-run cimplify deploy.`
|
|
|
117
117
|
}
|
|
118
118
|
async function pushForDeploy(client, businessId, projectId, root, branch, linkRemoteUrl) {
|
|
119
119
|
const originUrl = await gitGetRemoteUrl(root);
|
|
120
|
-
const repo =
|
|
120
|
+
const repo = isManagedRemote(originUrl) || isManagedRemote(linkRemoteUrl) ? null : await fetchRepoRecord(client, businessId, projectId);
|
|
121
121
|
const strategy = resolvePushStrategy(originUrl, linkRemoteUrl, repo);
|
|
122
122
|
if (strategy.kind === "error") {
|
|
123
123
|
throw new CliError(CLI_ERROR_CODE.GIT_ERROR, strategy.message);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run as default, detectPackageManager, mergeEnvEntries } from './chunk-
|
|
2
|
+
export { run as default, detectPackageManager, mergeEnvEntries } from './chunk-OLZKNUMK.mjs';
|
|
3
3
|
import './chunk-I2UP7YTG.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-2MKZKUVH.mjs';
|
|
5
5
|
import './chunk-5KYR6WJB.mjs';
|
|
6
6
|
import './chunk-NYXA6X56.mjs';
|
|
7
7
|
import './chunk-MLE4MVYC.mjs';
|
package/dist/dispatcher.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { TEMPLATES } from './chunk-ARIDYKLO.mjs';
|
|
3
|
-
import { package_default } from './chunk-
|
|
3
|
+
import { package_default } from './chunk-3RPR33MO.mjs';
|
|
4
4
|
|
|
5
5
|
// src/dispatcher.ts
|
|
6
6
|
var VERSION = package_default.version ?? "unknown";
|
|
@@ -137,29 +137,29 @@ var COMMANDS = {
|
|
|
137
137
|
login: () => import('./login-RLMDEWAL.mjs'),
|
|
138
138
|
logout: () => import('./logout-Z57X6HPE.mjs'),
|
|
139
139
|
whoami: () => import('./whoami-CQPPARRS.mjs'),
|
|
140
|
-
projects: () => import('./projects-
|
|
141
|
-
link: () => import('./link-
|
|
140
|
+
projects: () => import('./projects-YL4T24VV.mjs'),
|
|
141
|
+
link: () => import('./link-76Z6V6CJ.mjs'),
|
|
142
142
|
unlink: () => import('./unlink-H3BO3DOQ.mjs'),
|
|
143
|
-
deploy: () => import('./deploy-
|
|
143
|
+
deploy: () => import('./deploy-STWZ3OSM.mjs'),
|
|
144
144
|
cancel: () => import('./cancel-ZHVVILOU.mjs'),
|
|
145
|
-
rollback: () => import('./rollback-
|
|
146
|
-
env: () => import('./env-
|
|
147
|
-
domains: () => import('./domains-
|
|
148
|
-
logs: () => import('./logs-
|
|
149
|
-
status: () => import('./status-
|
|
150
|
-
dev: () => import('./dev-
|
|
145
|
+
rollback: () => import('./rollback-47VQ4HJK.mjs'),
|
|
146
|
+
env: () => import('./env-TNCYUAMT.mjs'),
|
|
147
|
+
domains: () => import('./domains-FTNK4IKY.mjs'),
|
|
148
|
+
logs: () => import('./logs-TNDM4RFE.mjs'),
|
|
149
|
+
status: () => import('./status-TWPOMWNA.mjs'),
|
|
150
|
+
dev: () => import('./dev-7O65HY6C.mjs'),
|
|
151
151
|
mock: () => import('./mock-EVER34IX.mjs'),
|
|
152
|
-
introspect: () => import('./introspect-
|
|
152
|
+
introspect: () => import('./introspect-RC265ACF.mjs'),
|
|
153
153
|
inspect: () => import('./inspect-X3M7WSTL.mjs'),
|
|
154
|
-
doctor: () => import('./doctor-
|
|
154
|
+
doctor: () => import('./doctor-3RW3OGZJ.mjs'),
|
|
155
155
|
lint: () => import('./lint-DDZ7HUQN.mjs'),
|
|
156
|
-
explain: () => import('./explain-
|
|
156
|
+
explain: () => import('./explain-DLRUUCNS.mjs'),
|
|
157
157
|
assets: () => import('./assets-CWB72PZG.mjs'),
|
|
158
|
-
repo: () => import('./repo-
|
|
158
|
+
repo: () => import('./repo-UUT3AZ3L.mjs'),
|
|
159
159
|
list: () => import('./list-2MFOQKKQ.mjs'),
|
|
160
160
|
add: () => import('./add-KRIIKAS4.mjs'),
|
|
161
|
-
update: () => import('./update-
|
|
162
|
-
upgrade: () => import('./update-
|
|
161
|
+
update: () => import('./update-FLY46XI3.mjs'),
|
|
162
|
+
upgrade: () => import('./update-FLY46XI3.mjs'),
|
|
163
163
|
"auth-step-up": () => import('./auth-step-up-Z6KOTTV7.mjs')
|
|
164
164
|
};
|
|
165
165
|
var COMMAND_PREFIXES = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gatherIntrospection } from './chunk-
|
|
2
|
+
import { gatherIntrospection } from './chunk-LJEKKFC7.mjs';
|
|
3
3
|
import './chunk-I2UP7YTG.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-3RPR33MO.mjs';
|
|
5
|
+
import './chunk-UTD34C2H.mjs';
|
|
6
|
+
import './chunk-2MKZKUVH.mjs';
|
|
6
7
|
import { parseArgs, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
7
8
|
import { SDK_ENV_API_URL, DEFAULT_API_BASE_URL, ApiClient, ENV_API_BASE_URL } from './chunk-NYXA6X56.mjs';
|
|
8
9
|
import { readAuthOrNull } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { promptYesNo } from './chunk-TH4XENKH.mjs';
|
|
3
|
-
import { ENV_SCOPE, DOMAIN_TYPE } from './chunk-
|
|
3
|
+
import { ENV_SCOPE, DOMAIN_TYPE } from './chunk-2MKZKUVH.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-5KYR6WJB.mjs';
|
|
5
5
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
6
6
|
import { readAuth, readProjectLink } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { formatEnvFile, parseEnvFile, parseKeyValueArg } from './chunk-I2UP7YTG.mjs';
|
|
3
3
|
import { promptYesNo } from './chunk-TH4XENKH.mjs';
|
|
4
|
-
import { ENV_SCOPE, PUBLIC_ENV_PREFIX, SECRET_MASK } from './chunk-
|
|
4
|
+
import { ENV_SCOPE, PUBLIC_ENV_PREFIX, SECRET_MASK } from './chunk-2MKZKUVH.mjs';
|
|
5
5
|
import { parseArgs, flagString, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
6
6
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
7
7
|
import { readAuth, readProjectLink } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { package_default } from './chunk-
|
|
2
|
+
import { package_default } from './chunk-3RPR33MO.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-5KYR6WJB.mjs';
|
|
4
4
|
import { bold, dim, info, result, CliError, CLI_ERROR_CODE } from './chunk-3QUK5BPY.mjs';
|
|
5
5
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-
|
|
2
|
+
export { run as default, extractMockSeed, gatherIntrospection, renderIntrospection } from './chunk-LJEKKFC7.mjs';
|
|
3
3
|
import './chunk-I2UP7YTG.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-3RPR33MO.mjs';
|
|
5
|
+
import './chunk-UTD34C2H.mjs';
|
|
6
|
+
import './chunk-2MKZKUVH.mjs';
|
|
6
7
|
import './chunk-5KYR6WJB.mjs';
|
|
7
8
|
import './chunk-MLE4MVYC.mjs';
|
|
8
9
|
import './chunk-3QUK5BPY.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { gitDetectRoot, gitGetRemoteUrl, gitAddRemote } from './chunk-
|
|
2
|
+
import { gitDetectRoot, gitGetRemoteUrl, gitAddRemote } from './chunk-UTD34C2H.mjs';
|
|
3
|
+
import './chunk-2MKZKUVH.mjs';
|
|
3
4
|
import { parseArgs } from './chunk-5KYR6WJB.mjs';
|
|
4
5
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
5
6
|
import { readAuth, writeProjectLink } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { TERMINAL_DEPLOYMENT_STATUSES } from './chunk-
|
|
2
|
+
import { TERMINAL_DEPLOYMENT_STATUSES } from './chunk-2MKZKUVH.mjs';
|
|
3
3
|
import { parseArgs, flagString, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
4
4
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
5
5
|
import { readAuth, readProjectLink, readProjectState } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { managedProviderForHost } from './chunk-UTD34C2H.mjs';
|
|
3
|
+
import { REPO_PROVIDER, isManagedRepoProvider } from './chunk-2MKZKUVH.mjs';
|
|
3
4
|
import { parseArgs, flagString, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
4
5
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
5
6
|
import { readAuth } from './chunk-MLE4MVYC.mjs';
|
|
@@ -35,7 +36,8 @@ function extractHost(url) {
|
|
|
35
36
|
}
|
|
36
37
|
function detectProviderFromUrl(url) {
|
|
37
38
|
const host = extractHost(url);
|
|
38
|
-
|
|
39
|
+
const managed = managedProviderForHost(host);
|
|
40
|
+
if (managed) return managed;
|
|
39
41
|
if (host === "github.com" || host.endsWith(".github.com")) return REPO_PROVIDER.GITHUB;
|
|
40
42
|
if (host.includes("gitea")) return REPO_PROVIDER.GITEA;
|
|
41
43
|
return REPO_PROVIDER.EXTERNAL;
|
|
@@ -146,7 +148,7 @@ async function createProject(client, businessId, name, options = {}) {
|
|
|
146
148
|
}
|
|
147
149
|
if (options.connectRemote) {
|
|
148
150
|
const provider = detectProviderFromUrl(options.connectRemote);
|
|
149
|
-
if (provider
|
|
151
|
+
if (isManagedRepoProvider(provider)) {
|
|
150
152
|
throw new CliError(
|
|
151
153
|
CLI_ERROR_CODE.INVALID_INPUT,
|
|
152
154
|
"That URL points at Cimplify's managed Git host \u2014 managed repos are provisioned, not connected. Use `cimplify repo provision` instead."
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run as default, fetchCloneToken, fetchRepoRecord } from './chunk-
|
|
2
|
+
export { run as default, fetchCloneToken, fetchRepoRecord } from './chunk-LZEG3FEY.mjs';
|
|
3
3
|
import './chunk-TH4XENKH.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-UTD34C2H.mjs';
|
|
5
|
+
import './chunk-2MKZKUVH.mjs';
|
|
6
6
|
import './chunk-5KYR6WJB.mjs';
|
|
7
7
|
import './chunk-NYXA6X56.mjs';
|
|
8
8
|
import './chunk-MLE4MVYC.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { pollDeployment } from './chunk-
|
|
3
|
-
import { DEPLOYMENT_STATUS, DEPLOY_TRIGGER } from './chunk-
|
|
2
|
+
import { pollDeployment } from './chunk-O2TO2J4I.mjs';
|
|
3
|
+
import { DEPLOYMENT_STATUS, DEPLOY_TRIGGER } from './chunk-2MKZKUVH.mjs';
|
|
4
4
|
import { parseArgs, flagBool } from './chunk-5KYR6WJB.mjs';
|
|
5
5
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
6
6
|
import { readAuth, readProjectLink, writeProjectState } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { DEPLOYMENT_STATUS } from './chunk-
|
|
2
|
+
import { DEPLOYMENT_STATUS } from './chunk-2MKZKUVH.mjs';
|
|
3
3
|
import { parseArgs } from './chunk-5KYR6WJB.mjs';
|
|
4
4
|
import { ApiClient } from './chunk-NYXA6X56.mjs';
|
|
5
5
|
import { readAuth, readProjectLink, readProjectState } from './chunk-MLE4MVYC.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { promptYesNo } from './chunk-TH4XENKH.mjs';
|
|
3
|
-
import { package_default } from './chunk-
|
|
3
|
+
import { package_default } from './chunk-3RPR33MO.mjs';
|
|
4
4
|
import { parseArgs, flagBool, flagString } from './chunk-5KYR6WJB.mjs';
|
|
5
5
|
import { success, bold, info, dim, result, failure, CliError, CLI_ERROR_CODE, step, isJsonMode } from './chunk-3QUK5BPY.mjs';
|
|
6
6
|
import { spawn } from 'child_process';
|