@intentic/constants 1.331.0 → 1.333.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/one-liner.d.ts +177 -0
- package/dist/one-liner.d.ts.map +1 -0
- package/dist/one-liner.js +158 -0
- package/dist/one-liner.js.map +1 -0
- package/dist/provider-logos.d.ts +1 -0
- package/dist/provider-logos.d.ts.map +1 -1
- package/dist/provider-logos.js +1 -0
- package/dist/provider-logos.js.map +1 -1
- package/package.json +2 -2
- package/src/heavy/heavy-rules.cjs +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export declare const INSTALL_SCRIPTS: {
|
|
|
93
93
|
export type InstallScript = keyof typeof INSTALL_SCRIPTS;
|
|
94
94
|
export declare const installScriptUrl: (key: InstallScript) => string;
|
|
95
95
|
export declare const installScriptPath: (key: InstallScript) => string;
|
|
96
|
+
export * from "./one-liner.js";
|
|
96
97
|
export declare const DAEMON_PORT = 8787;
|
|
97
98
|
export declare const PREVIEW_PORT = 5173;
|
|
98
99
|
export declare const LOCAL_PORT = 8788;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAOnC,eAAO,MAAM,cAAc,UAAU,CAAC;AAGtC,eAAO,MAAM,YAAY,aAAa,CAAC;AAGvC,eAAO,MAAM,SAAS,cAAc,CAAC;AAKrC,eAAO,MAAM,aAAa,SAAS,CAAC;AAGpC,eAAO,MAAM,UAAU,WAAW,CAAC;AAKnC,eAAO,MAAM,WAAW,cAAc,CAAC;AAKvC,eAAO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AE,SAAS;;CACoB,CAAC;AAEpE,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,eAAe,CAAC;AAGzD,eAAO,MAAM,gBAAgB,QAAS,aAAa,KAAG,MAA+D,CAAC;AAGtH,eAAO,MAAM,iBAAiB,QAAS,aAAa,KAAG,MAA+D,CAAC;AAIvH,cAAc,gBAAgB,CAAC;AAI/B,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AAGjC,eAAO,MAAM,UAAU,OAAO,CAAC;AAG/B,eAAO,MAAM,eAAe,OAAO,CAAC;AAIpC,eAAO,MAAM,WAAW,OAAO,CAAC;AAGhC,eAAO,MAAM,gBAAgB,6EAA6E,CAAC;AAG3G,eAAO,MAAM,wBAAwB,0FAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,7 @@ export const INSTALL_SCRIPTS = {
|
|
|
41
41
|
};
|
|
42
42
|
export const installScriptUrl = (key) => `${PLATFORM_SITE_ORIGIN}${INSTALL_SCRIPTS[key].path}`;
|
|
43
43
|
export const installScriptPath = (key) => `${INSTALL_SCRIPTS_DIR}/${INSTALL_SCRIPTS[key].file}`;
|
|
44
|
+
export * from "./one-liner.js";
|
|
44
45
|
export const DAEMON_PORT = 8787;
|
|
45
46
|
export const PREVIEW_PORT = 5173;
|
|
46
47
|
export const LOCAL_PORT = 8788;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAOnC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAGtC,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAGvC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAKrC,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AE,IAAI,EAAE,aAAa,EAAE;IAGzD,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IACrC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;CACkB,CAAC;AAKpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAkB,EAAU,EAAE,CAAC,GAAG,oBAAoB,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAGtH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,GAAkB,EAAU,EAAE,CAAC,GAAG,mBAAmB,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAIvH,cAAc,gBAAgB,CAAC;AAI/B,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AAGjC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAG/B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAIpC,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAGhC,MAAM,CAAC,MAAM,gBAAgB,GAAG,0EAA0E,CAAC;AAG3G,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
export type OneLinerShell = "sh" | "ps1";
|
|
2
|
+
export declare const SETUP_CODE_PATTERN: RegExp;
|
|
3
|
+
export declare const SYNC_LEAF_PATTERN: RegExp;
|
|
4
|
+
export declare const FIX_CODE_PATTERN: RegExp;
|
|
5
|
+
export declare const SLUG_PATTERN: RegExp;
|
|
6
|
+
export declare const IMAGE_HASH_PATTERN: RegExp;
|
|
7
|
+
export declare const SHORT_CODE_PATTERN: RegExp;
|
|
8
|
+
export declare const HOSTNAME_PATTERN: RegExp;
|
|
9
|
+
export declare const SAFE_ARG: RegExp;
|
|
10
|
+
export declare const DEFAULT_SYNC_ROOT = "~/intentic";
|
|
11
|
+
export declare const isOneLinerHost: (host: string) => boolean;
|
|
12
|
+
export declare const oneLinerHostOf: (sandboxUrl: string | undefined | null) => string | undefined;
|
|
13
|
+
interface ArgSpec {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly test: (value: string) => boolean;
|
|
16
|
+
readonly normalize?: (value: string) => string;
|
|
17
|
+
}
|
|
18
|
+
export interface Ps1Param {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly value?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ResolvedOneLiner {
|
|
23
|
+
readonly files: {
|
|
24
|
+
readonly sh: string;
|
|
25
|
+
readonly ps1: string;
|
|
26
|
+
};
|
|
27
|
+
readonly shArgs: readonly string[];
|
|
28
|
+
readonly shEnv: readonly (readonly [name: string, value: string])[];
|
|
29
|
+
readonly ps1Params: readonly Ps1Param[];
|
|
30
|
+
}
|
|
31
|
+
interface VerbSpec {
|
|
32
|
+
readonly files: {
|
|
33
|
+
readonly sh: string;
|
|
34
|
+
readonly ps1: string;
|
|
35
|
+
};
|
|
36
|
+
readonly required: readonly ArgSpec[];
|
|
37
|
+
readonly optional: readonly ArgSpec[];
|
|
38
|
+
readonly sh: (args: readonly string[]) => {
|
|
39
|
+
readonly args: readonly string[];
|
|
40
|
+
readonly env?: readonly (readonly [string, string])[];
|
|
41
|
+
};
|
|
42
|
+
readonly ps1: (args: readonly string[]) => readonly Ps1Param[];
|
|
43
|
+
}
|
|
44
|
+
declare const VERBS: {
|
|
45
|
+
readonly setup: {
|
|
46
|
+
readonly files: {
|
|
47
|
+
readonly sh: `connect.sh`;
|
|
48
|
+
readonly ps1: `connect.ps1`;
|
|
49
|
+
};
|
|
50
|
+
readonly required: readonly [ArgSpec];
|
|
51
|
+
readonly optional: readonly [ArgSpec];
|
|
52
|
+
readonly sh: ([code, leaf]: readonly string[]) => {
|
|
53
|
+
args: string[];
|
|
54
|
+
env: [string, string][];
|
|
55
|
+
};
|
|
56
|
+
readonly ps1: ([code, leaf]: readonly string[]) => {
|
|
57
|
+
name: string;
|
|
58
|
+
value: string;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
readonly fix: {
|
|
62
|
+
readonly files: {
|
|
63
|
+
readonly sh: `fix.sh`;
|
|
64
|
+
readonly ps1: `fix.ps1`;
|
|
65
|
+
};
|
|
66
|
+
readonly required: readonly [ArgSpec];
|
|
67
|
+
readonly optional: readonly [];
|
|
68
|
+
readonly sh: ([code]: readonly string[]) => {
|
|
69
|
+
args: string[];
|
|
70
|
+
};
|
|
71
|
+
readonly ps1: ([code]: readonly string[]) => {
|
|
72
|
+
name: string;
|
|
73
|
+
value: string;
|
|
74
|
+
}[];
|
|
75
|
+
};
|
|
76
|
+
readonly update: {
|
|
77
|
+
readonly files: {
|
|
78
|
+
readonly sh: `recreate.sh`;
|
|
79
|
+
readonly ps1: `recreate.ps1`;
|
|
80
|
+
};
|
|
81
|
+
readonly required: readonly [ArgSpec];
|
|
82
|
+
readonly optional: readonly [];
|
|
83
|
+
readonly sh: ([name]: readonly string[]) => {
|
|
84
|
+
args: string[];
|
|
85
|
+
};
|
|
86
|
+
readonly ps1: ([name]: readonly string[]) => {
|
|
87
|
+
name: string;
|
|
88
|
+
value: string;
|
|
89
|
+
}[];
|
|
90
|
+
};
|
|
91
|
+
readonly rollback: {
|
|
92
|
+
readonly files: {
|
|
93
|
+
readonly sh: `recreate.sh`;
|
|
94
|
+
readonly ps1: `recreate.ps1`;
|
|
95
|
+
};
|
|
96
|
+
readonly required: readonly [ArgSpec];
|
|
97
|
+
readonly optional: readonly [];
|
|
98
|
+
readonly sh: ([name]: readonly string[]) => {
|
|
99
|
+
args: string[];
|
|
100
|
+
};
|
|
101
|
+
readonly ps1: ([name]: readonly string[]) => ({
|
|
102
|
+
name: string;
|
|
103
|
+
value: string;
|
|
104
|
+
} | {
|
|
105
|
+
value?: never;
|
|
106
|
+
name: string;
|
|
107
|
+
})[];
|
|
108
|
+
};
|
|
109
|
+
readonly restart: {
|
|
110
|
+
readonly files: {
|
|
111
|
+
readonly sh: `recreate.sh`;
|
|
112
|
+
readonly ps1: `recreate.ps1`;
|
|
113
|
+
};
|
|
114
|
+
readonly required: readonly [ArgSpec];
|
|
115
|
+
readonly optional: readonly [];
|
|
116
|
+
readonly sh: ([name]: readonly string[]) => {
|
|
117
|
+
args: string[];
|
|
118
|
+
};
|
|
119
|
+
readonly ps1: ([name]: readonly string[]) => ({
|
|
120
|
+
name: string;
|
|
121
|
+
value: string;
|
|
122
|
+
} | {
|
|
123
|
+
value?: never;
|
|
124
|
+
name: string;
|
|
125
|
+
})[];
|
|
126
|
+
};
|
|
127
|
+
readonly rebuild: {
|
|
128
|
+
readonly files: {
|
|
129
|
+
readonly sh: `recreate.sh`;
|
|
130
|
+
readonly ps1: `recreate.ps1`;
|
|
131
|
+
};
|
|
132
|
+
readonly required: readonly [ArgSpec, ArgSpec];
|
|
133
|
+
readonly optional: readonly [];
|
|
134
|
+
readonly sh: ([name, hash]: readonly string[]) => {
|
|
135
|
+
args: string[];
|
|
136
|
+
};
|
|
137
|
+
readonly ps1: ([name, hash]: readonly string[]) => {
|
|
138
|
+
name: string;
|
|
139
|
+
value: string;
|
|
140
|
+
}[];
|
|
141
|
+
};
|
|
142
|
+
readonly remove: {
|
|
143
|
+
readonly files: {
|
|
144
|
+
readonly sh: `cleanup.sh`;
|
|
145
|
+
readonly ps1: `cleanup.ps1`;
|
|
146
|
+
};
|
|
147
|
+
readonly required: readonly [];
|
|
148
|
+
readonly optional: readonly [ArgSpec];
|
|
149
|
+
readonly sh: ([name]: readonly string[]) => {
|
|
150
|
+
args: string[];
|
|
151
|
+
};
|
|
152
|
+
readonly ps1: ([name]: readonly string[]) => ({
|
|
153
|
+
name: string;
|
|
154
|
+
value: string;
|
|
155
|
+
} | {
|
|
156
|
+
value?: never;
|
|
157
|
+
name: string;
|
|
158
|
+
})[];
|
|
159
|
+
};
|
|
160
|
+
readonly device: VerbSpec;
|
|
161
|
+
readonly sync: VerbSpec;
|
|
162
|
+
readonly server: VerbSpec;
|
|
163
|
+
};
|
|
164
|
+
export type OneLinerVerb = keyof typeof VERBS;
|
|
165
|
+
export declare const ONE_LINER_VERBS: readonly OneLinerVerb[];
|
|
166
|
+
export declare const isOneLinerVerb: (value: string) => value is OneLinerVerb;
|
|
167
|
+
export declare const resolveOneLiner: (verb: OneLinerVerb, raw: readonly string[]) => ResolvedOneLiner | {
|
|
168
|
+
readonly error: string;
|
|
169
|
+
};
|
|
170
|
+
export declare const oneLinerFits: (verb: OneLinerVerb, args: readonly string[]) => boolean;
|
|
171
|
+
export declare const oneLinerUrl: (verb: OneLinerVerb, args?: readonly string[]) => string;
|
|
172
|
+
export declare const oneLinerCommand: (verb: OneLinerVerb, args: readonly string[], shell: OneLinerShell) => string;
|
|
173
|
+
export declare const ps1ParamsText: (params: readonly Ps1Param[]) => string;
|
|
174
|
+
export declare const shArgsText: (args: readonly string[]) => string;
|
|
175
|
+
export declare const oneLinerByPath: (verb: OneLinerVerb, args: readonly string[], shell: OneLinerShell) => string;
|
|
176
|
+
export {};
|
|
177
|
+
//# sourceMappingURL=one-liner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one-liner.d.ts","sourceRoot":"","sources":["../src/one-liner.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,KAAK,CAAC;AAGzC,eAAO,MAAM,kBAAkB,QAAwB,CAAC;AAGxD,eAAO,MAAM,iBAAiB,QAA8B,CAAC;AAG7D,eAAO,MAAM,gBAAgB,QAAoC,CAAC;AAClE,eAAO,MAAM,YAAY,QAA8B,CAAC;AACxD,eAAO,MAAM,kBAAkB,QAAqB,CAAC;AAErD,eAAO,MAAM,kBAAkB,QAAqC,CAAC;AAErE,eAAO,MAAM,gBAAgB,QAAmG,CAAC;AAGjI,eAAO,MAAM,QAAQ,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Aa,KAAG,MAGnG,CAAC;AAKF,eAAO,MAAM,aAAa,WAAY,SAAS,QAAQ,EAAE,KAAG,MACgE,CAAC;AAG7H,eAAO,MAAM,UAAU,SAAU,SAAS,MAAM,EAAE,KAAG,MAAmC,CAAC;AAMzF,eAAO,MAAM,cAAc,SAAU,YAAY,QAAQ,SAAS,MAAM,EAAE,SAAS,aAAa,KAAG,MASlG,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { INSTALL_SCRIPTS_DIR, PLATFORM_SITE_ORIGIN } from "./index.js";
|
|
2
|
+
export const SETUP_CODE_PATTERN = /^[A-Za-z0-9]{6,64}$/;
|
|
3
|
+
export const SYNC_LEAF_PATTERN = /^[a-z0-9][a-z0-9-]{0,80}$/;
|
|
4
|
+
export const FIX_CODE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/;
|
|
5
|
+
export const SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{1,62}$/;
|
|
6
|
+
export const IMAGE_HASH_PATTERN = /^[a-f0-9]{8,64}$/;
|
|
7
|
+
export const SHORT_CODE_PATTERN = /^[0-9A-Za-z]{4}-?[0-9A-Za-z]{4}$/;
|
|
8
|
+
export const HOSTNAME_PATTERN = /^(?=.{4,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$/;
|
|
9
|
+
export const SAFE_ARG = /^[A-Za-z0-9._~/-]+$/;
|
|
10
|
+
export const DEFAULT_SYNC_ROOT = "~/intentic";
|
|
11
|
+
export const isOneLinerHost = (host) => HOSTNAME_PATTERN.test(host) && !/^\d+$/.test(host.slice(host.lastIndexOf(".") + 1));
|
|
12
|
+
export const oneLinerHostOf = (sandboxUrl) => {
|
|
13
|
+
if (sandboxUrl === undefined || sandboxUrl === null || sandboxUrl === ``) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
if (!URL.canParse(sandboxUrl)) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const url = new URL(sandboxUrl);
|
|
20
|
+
const host = url.hostname.toLowerCase();
|
|
21
|
+
return url.protocol === `https:` && url.port === `` && isOneLinerHost(host) ? host : undefined;
|
|
22
|
+
};
|
|
23
|
+
const arg = (name, pattern, normalize) => ({
|
|
24
|
+
name,
|
|
25
|
+
test: (value) => pattern.test(value),
|
|
26
|
+
...(normalize === undefined ? {} : { normalize }),
|
|
27
|
+
});
|
|
28
|
+
const slug = arg(`sandbox name`, SLUG_PATTERN);
|
|
29
|
+
const host = { name: `sandbox address`, test: isOneLinerHost, normalize: (value) => value.toLowerCase() };
|
|
30
|
+
const shortCode = arg(`code`, SHORT_CODE_PATTERN);
|
|
31
|
+
const RECREATE = { sh: `recreate.sh`, ps1: `recreate.ps1` };
|
|
32
|
+
const coded = (sh, ps1) => ({
|
|
33
|
+
files: { sh, ps1 },
|
|
34
|
+
required: [host, shortCode],
|
|
35
|
+
optional: [],
|
|
36
|
+
sh: ([address = ``, code = ``]) => ({ args: [address, code] }),
|
|
37
|
+
ps1: ([address = ``, code = ``]) => [
|
|
38
|
+
{ name: `Sandbox`, value: address },
|
|
39
|
+
{ name: `Code`, value: code },
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
const VERBS = {
|
|
43
|
+
setup: {
|
|
44
|
+
files: { sh: `connect.sh`, ps1: `connect.ps1` },
|
|
45
|
+
required: [arg(`setup code`, SETUP_CODE_PATTERN)],
|
|
46
|
+
optional: [arg(`sync folder`, SYNC_LEAF_PATTERN)],
|
|
47
|
+
sh: ([code = ``, leaf]) => ({ args: [code], env: leaf === undefined ? [] : [[`SYNC_DIR`, `${DEFAULT_SYNC_ROOT}/${leaf}`]] }),
|
|
48
|
+
ps1: ([code = ``, leaf]) => [
|
|
49
|
+
{ name: `SetupCode`, value: code },
|
|
50
|
+
...(leaf === undefined ? [] : [{ name: `SyncDir`, value: `${DEFAULT_SYNC_ROOT}/${leaf}` }]),
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
fix: {
|
|
54
|
+
files: { sh: `fix.sh`, ps1: `fix.ps1` },
|
|
55
|
+
required: [arg(`fix code`, FIX_CODE_PATTERN)],
|
|
56
|
+
optional: [],
|
|
57
|
+
sh: ([code = ``]) => ({ args: [code] }),
|
|
58
|
+
ps1: ([code = ``]) => [{ name: `Code`, value: code }],
|
|
59
|
+
},
|
|
60
|
+
update: {
|
|
61
|
+
files: RECREATE,
|
|
62
|
+
required: [slug],
|
|
63
|
+
optional: [],
|
|
64
|
+
sh: ([name = ``]) => ({ args: [name] }),
|
|
65
|
+
ps1: ([name = ``]) => [{ name: `Slug`, value: name }],
|
|
66
|
+
},
|
|
67
|
+
rollback: {
|
|
68
|
+
files: RECREATE,
|
|
69
|
+
required: [slug],
|
|
70
|
+
optional: [],
|
|
71
|
+
sh: ([name = ``]) => ({ args: [name, `--rollback`] }),
|
|
72
|
+
ps1: ([name = ``]) => [{ name: `Slug`, value: name }, { name: `Rollback` }],
|
|
73
|
+
},
|
|
74
|
+
restart: {
|
|
75
|
+
files: RECREATE,
|
|
76
|
+
required: [slug],
|
|
77
|
+
optional: [],
|
|
78
|
+
sh: ([name = ``]) => ({ args: [name, `--restart`] }),
|
|
79
|
+
ps1: ([name = ``]) => [{ name: `Slug`, value: name }, { name: `Restart` }],
|
|
80
|
+
},
|
|
81
|
+
rebuild: {
|
|
82
|
+
files: RECREATE,
|
|
83
|
+
required: [slug, arg(`image hash`, IMAGE_HASH_PATTERN)],
|
|
84
|
+
optional: [],
|
|
85
|
+
sh: ([name = ``, hash = ``]) => ({ args: [name, hash] }),
|
|
86
|
+
ps1: ([name = ``, hash = ``]) => [
|
|
87
|
+
{ name: `Slug`, value: name },
|
|
88
|
+
{ name: `Hash`, value: hash },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
remove: {
|
|
92
|
+
files: { sh: `cleanup.sh`, ps1: `cleanup.ps1` },
|
|
93
|
+
required: [],
|
|
94
|
+
optional: [slug],
|
|
95
|
+
sh: ([name]) => ({ args: name === undefined ? [] : [name, `--yes`] }),
|
|
96
|
+
ps1: ([name]) => (name === undefined ? [] : [{ name: `Slug`, value: name }, { name: `Yes` }]),
|
|
97
|
+
},
|
|
98
|
+
device: coded(`device.sh`, `device.ps1`),
|
|
99
|
+
sync: coded(`sync.sh`, `sync.ps1`),
|
|
100
|
+
server: coded(`connect-host.sh`, `connect-host.ps1`),
|
|
101
|
+
};
|
|
102
|
+
export const ONE_LINER_VERBS = Object.keys(VERBS);
|
|
103
|
+
export const isOneLinerVerb = (value) => Object.hasOwn(VERBS, value);
|
|
104
|
+
const article = (noun) => (/^[aeiou]/.test(noun) ? `an` : `a`);
|
|
105
|
+
export const resolveOneLiner = (verb, raw) => {
|
|
106
|
+
const spec = VERBS[verb];
|
|
107
|
+
const most = spec.required.length + spec.optional.length;
|
|
108
|
+
if (raw.length < spec.required.length || raw.length > most) {
|
|
109
|
+
const wanted = [...spec.required.map((a) => `${article(a.name)} ${a.name}`), ...spec.optional.map((a) => `an optional ${a.name}`)];
|
|
110
|
+
return { error: wanted.length === 0 ? `${verb} takes nothing after it.` : `${verb} takes ${wanted.join(` and `)}.` };
|
|
111
|
+
}
|
|
112
|
+
const specs = [...spec.required, ...spec.optional];
|
|
113
|
+
const args = [];
|
|
114
|
+
for (const [index, value] of raw.entries()) {
|
|
115
|
+
const which = specs[index];
|
|
116
|
+
const normalized = which.normalize === undefined ? value : which.normalize(value);
|
|
117
|
+
if (!which.test(normalized) || !SAFE_ARG.test(normalized)) {
|
|
118
|
+
return { error: `That is not a valid ${which.name} for ${verb}.` };
|
|
119
|
+
}
|
|
120
|
+
args.push(normalized);
|
|
121
|
+
}
|
|
122
|
+
const sh = spec.sh(args);
|
|
123
|
+
return { files: spec.files, shArgs: sh.args, shEnv: sh.env ?? [], ps1Params: spec.ps1(args) };
|
|
124
|
+
};
|
|
125
|
+
const resolved = (verb, args) => {
|
|
126
|
+
const answer = resolveOneLiner(verb, args);
|
|
127
|
+
if (`error` in answer) {
|
|
128
|
+
throw new Error(answer.error);
|
|
129
|
+
}
|
|
130
|
+
return answer;
|
|
131
|
+
};
|
|
132
|
+
export const oneLinerFits = (verb, args) => !(`error` in resolveOneLiner(verb, args));
|
|
133
|
+
export const oneLinerUrl = (verb, args = []) => {
|
|
134
|
+
const normalized = args.map((value, index) => {
|
|
135
|
+
const which = [...VERBS[verb].required, ...VERBS[verb].optional][index];
|
|
136
|
+
return which?.normalize === undefined ? value : which.normalize(value);
|
|
137
|
+
});
|
|
138
|
+
resolved(verb, normalized);
|
|
139
|
+
return [PLATFORM_SITE_ORIGIN, verb, ...normalized].join(`/`);
|
|
140
|
+
};
|
|
141
|
+
export const oneLinerCommand = (verb, args, shell) => {
|
|
142
|
+
const url = oneLinerUrl(verb, args);
|
|
143
|
+
return shell === `ps1` ? `irm ${url} | iex` : `curl -fsSL ${url} | sh`;
|
|
144
|
+
};
|
|
145
|
+
const quote = (value) => `'${value}'`;
|
|
146
|
+
export const ps1ParamsText = (params) => params.map((param) => (param.value === undefined ? `-${param.name}` : `-${param.name} ${quote(param.value)}`)).join(` `);
|
|
147
|
+
export const shArgsText = (args) => args.map(quote).join(` `);
|
|
148
|
+
export const oneLinerByPath = (verb, args, shell) => {
|
|
149
|
+
const answer = resolved(verb, args);
|
|
150
|
+
if (shell === `ps1`) {
|
|
151
|
+
const params = ps1ParamsText(answer.ps1Params);
|
|
152
|
+
return `& ./${INSTALL_SCRIPTS_DIR}/${answer.files.ps1}${params === `` ? `` : ` ${params}`}`;
|
|
153
|
+
}
|
|
154
|
+
const env = answer.shEnv.map(([name, value]) => ` ${name}=${quote(value)}`).join(``);
|
|
155
|
+
const positional = shArgsText(answer.shArgs);
|
|
156
|
+
return `${env === `` ? `` : `env${env} `}sh ${INSTALL_SCRIPTS_DIR}/${answer.files.sh}${positional === `` ? `` : ` ${positional}`}`;
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=one-liner.js.map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C,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,EAAE,CAAC;IAChG,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrF,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAO,GAAG,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,MAAM,mBAAmB,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,EAAE,CAAC;AACvI,CAAC,CAAC"}
|
package/dist/provider-logos.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const PROVIDER_BRAND_PATHS: {
|
|
|
5
5
|
readonly kimi: `M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`;
|
|
6
6
|
readonly gemini: `M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`;
|
|
7
7
|
readonly cursor: `M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23`;
|
|
8
|
+
readonly devin: `M9.2924 10.0645L9.2924 10.0661C9.6314 9.8704 10.0167 9.767 10.4068 9.767L10.4355 9.767L10.4761 9.7678C10.5031 9.7685 10.5294 9.7693 10.5565 9.7717L10.5764 9.7733C10.898 9.7972 11.2036 9.8879 11.4886 10.0446C11.5173 10.0605 11.5451 10.0764 11.573 10.0931C11.5945 10.1067 11.616 10.1202 11.6383 10.1345L11.659 10.148C11.8349 10.2666 11.9933 10.4106 12.1334 10.5792C12.1525 10.6023 12.1708 10.6253 12.1931 10.6548L12.2042 10.6691C12.2186 10.6882 12.2328 10.7081 12.2464 10.728L12.2711 10.7638C12.2822 10.7805 12.2926 10.7972 12.3029 10.8139C12.3117 10.8282 12.3204 10.8425 12.3292 10.8569L12.3443 10.8823C12.5401 11.2204 12.6436 11.607 12.6436 11.9985L12.6428 11.9985C12.6428 12.3907 12.5394 12.7765 12.3435 13.1146L12.3093 13.1727C12.295 13.1958 12.2806 13.2181 12.2663 13.2403L12.2552 13.2571C12.0737 13.5236 11.8428 13.7423 11.5634 13.911C11.5356 13.9277 11.5077 13.9436 11.479 13.9595C11.4568 13.9723 11.4337 13.9834 11.4106 13.9953L11.3883 14.0065C11.1973 14.0995 10.9935 14.1648 10.7777 14.2014C10.7483 14.2061 10.7188 14.2101 10.6893 14.2141L10.6647 14.2173C10.6408 14.2197 10.6169 14.2221 10.5923 14.2244C10.5779 14.2252 10.5636 14.2268 10.5493 14.2276C10.5294 14.2292 10.5102 14.23 10.4904 14.23C10.4736 14.23 10.457 14.2308 10.4402 14.2316L10.41 14.2316L10.4084 14.2316C10.0175 14.2316 9.6323 14.1282 9.2932 13.9325L7.2267 12.7407L3.0921 15.1306L3.0905 19.8999L7.2251 22.2858L11.3612 19.8991L11.3612 17.5133C11.3612 17.1211 11.4647 16.7352 11.6605 16.3971L11.6948 16.339C11.7091 16.316 11.7234 16.2937 11.7378 16.2714L11.7488 16.2547C11.9304 15.9882 12.1612 15.7694 12.4406 15.6008C12.4685 15.584 12.4964 15.5681 12.525 15.5522C12.5473 15.5403 12.5696 15.5284 12.5935 15.5164L12.6158 15.5053C12.8068 15.4122 13.0106 15.347 13.2263 15.3104C13.2558 15.3056 13.2852 15.3016 13.3147 15.2976L13.3394 15.2945C13.3632 15.2921 13.3871 15.2897 13.4126 15.2873L13.4548 15.2841C13.4747 15.2825 13.4938 15.2817 13.5137 15.2817C13.5304 15.2817 13.5471 15.2809 13.5638 15.2801L13.5941 15.2801L13.5957 15.2801C13.9865 15.2801 14.3718 15.3836 14.7109 15.5793L16.7782 16.771L20.9143 14.3844L20.9127 9.6134L16.7789 7.2268L14.7117 8.4217L14.7101 8.4185C14.3702 8.6142 13.9857 8.7152 13.5925 8.7176L13.5662 8.7176L13.5248 8.7168C13.4978 8.716 13.4715 8.7152 13.4444 8.7128L13.4245 8.7113C13.1029 8.6874 12.7973 8.5967 12.5123 8.44C12.4836 8.4241 12.4558 8.4081 12.4279 8.3914C12.4056 8.3779 12.3841 8.3636 12.3626 8.3501L12.3419 8.3366C12.166 8.218 12.0076 8.074 11.8675 7.9054C11.8484 7.8823 11.8301 7.8592 11.8078 7.8298L11.7967 7.8155C11.7823 7.7964 11.768 7.7765 11.7545 7.7566L11.7297 7.7208C11.7187 7.7041 11.7083 7.6874 11.698 7.6707C11.6892 7.6564 11.6796 7.642 11.6709 7.6269L11.6566 7.6023C11.4607 7.2641 11.3573 6.8775 11.3573 6.4861L11.3565 6.4861L11.3565 4.101L7.2418 1.7255L7.2219 1.7143L3.0873 4.1042L3.0857 8.8735L7.2203 11.2594L9.2884 10.0661L9.2924 10.0645Z`;
|
|
8
9
|
readonly meta: `M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z`;
|
|
9
10
|
readonly zai: `M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z`;
|
|
10
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-logos.d.ts","sourceRoot":"","sources":["../src/provider-logos.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;aAC7B,MAAM,EAAE,qxDAAqxD;aAC7xD,KAAK,EAAE,s7CAAs7C;aAC77C,IAAI,EAAE,8iBAA8iB;aAEpjB,IAAI,EAAE,iDAAiD;aACvD,MAAM,EAAE,8RAA8R;aAEtS,MAAM,EAAE,0VAA0V;aAElW,IAAI,EAAE,ksCAAksC;aAExsC,GAAG,EAAE,yHAAyH;CACxH,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAK9D,eAAO,MAAM,gBAAgB,UAAW,aAAa,KAAG,SAAS,GAAG,SAAgE,CAAC"}
|
|
1
|
+
{"version":3,"file":"provider-logos.d.ts","sourceRoot":"","sources":["../src/provider-logos.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB;aAC7B,MAAM,EAAE,qxDAAqxD;aAC7xD,KAAK,EAAE,s7CAAs7C;aAC77C,IAAI,EAAE,8iBAA8iB;aAEpjB,IAAI,EAAE,iDAAiD;aACvD,MAAM,EAAE,8RAA8R;aAEtS,MAAM,EAAE,0VAA0V;aAElW,KAAK,EAAE,gzFAAgzF;aAEvzF,IAAI,EAAE,ksCAAksC;aAExsC,GAAG,EAAE,yHAAyH;CACxH,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAK9D,eAAO,MAAM,gBAAgB,UAAW,aAAa,KAAG,SAAS,GAAG,SAAgE,CAAC"}
|
package/dist/provider-logos.js
CHANGED
|
@@ -5,6 +5,7 @@ export const PROVIDER_BRAND_PATHS = {
|
|
|
5
5
|
kimi: `M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`,
|
|
6
6
|
gemini: `M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,
|
|
7
7
|
cursor: `M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23`,
|
|
8
|
+
devin: `M9.2924 10.0645L9.2924 10.0661C9.6314 9.8704 10.0167 9.767 10.4068 9.767L10.4355 9.767L10.4761 9.7678C10.5031 9.7685 10.5294 9.7693 10.5565 9.7717L10.5764 9.7733C10.898 9.7972 11.2036 9.8879 11.4886 10.0446C11.5173 10.0605 11.5451 10.0764 11.573 10.0931C11.5945 10.1067 11.616 10.1202 11.6383 10.1345L11.659 10.148C11.8349 10.2666 11.9933 10.4106 12.1334 10.5792C12.1525 10.6023 12.1708 10.6253 12.1931 10.6548L12.2042 10.6691C12.2186 10.6882 12.2328 10.7081 12.2464 10.728L12.2711 10.7638C12.2822 10.7805 12.2926 10.7972 12.3029 10.8139C12.3117 10.8282 12.3204 10.8425 12.3292 10.8569L12.3443 10.8823C12.5401 11.2204 12.6436 11.607 12.6436 11.9985L12.6428 11.9985C12.6428 12.3907 12.5394 12.7765 12.3435 13.1146L12.3093 13.1727C12.295 13.1958 12.2806 13.2181 12.2663 13.2403L12.2552 13.2571C12.0737 13.5236 11.8428 13.7423 11.5634 13.911C11.5356 13.9277 11.5077 13.9436 11.479 13.9595C11.4568 13.9723 11.4337 13.9834 11.4106 13.9953L11.3883 14.0065C11.1973 14.0995 10.9935 14.1648 10.7777 14.2014C10.7483 14.2061 10.7188 14.2101 10.6893 14.2141L10.6647 14.2173C10.6408 14.2197 10.6169 14.2221 10.5923 14.2244C10.5779 14.2252 10.5636 14.2268 10.5493 14.2276C10.5294 14.2292 10.5102 14.23 10.4904 14.23C10.4736 14.23 10.457 14.2308 10.4402 14.2316L10.41 14.2316L10.4084 14.2316C10.0175 14.2316 9.6323 14.1282 9.2932 13.9325L7.2267 12.7407L3.0921 15.1306L3.0905 19.8999L7.2251 22.2858L11.3612 19.8991L11.3612 17.5133C11.3612 17.1211 11.4647 16.7352 11.6605 16.3971L11.6948 16.339C11.7091 16.316 11.7234 16.2937 11.7378 16.2714L11.7488 16.2547C11.9304 15.9882 12.1612 15.7694 12.4406 15.6008C12.4685 15.584 12.4964 15.5681 12.525 15.5522C12.5473 15.5403 12.5696 15.5284 12.5935 15.5164L12.6158 15.5053C12.8068 15.4122 13.0106 15.347 13.2263 15.3104C13.2558 15.3056 13.2852 15.3016 13.3147 15.2976L13.3394 15.2945C13.3632 15.2921 13.3871 15.2897 13.4126 15.2873L13.4548 15.2841C13.4747 15.2825 13.4938 15.2817 13.5137 15.2817C13.5304 15.2817 13.5471 15.2809 13.5638 15.2801L13.5941 15.2801L13.5957 15.2801C13.9865 15.2801 14.3718 15.3836 14.7109 15.5793L16.7782 16.771L20.9143 14.3844L20.9127 9.6134L16.7789 7.2268L14.7117 8.4217L14.7101 8.4185C14.3702 8.6142 13.9857 8.7152 13.5925 8.7176L13.5662 8.7176L13.5248 8.7168C13.4978 8.716 13.4715 8.7152 13.4444 8.7128L13.4245 8.7113C13.1029 8.6874 12.7973 8.5967 12.5123 8.44C12.4836 8.4241 12.4558 8.4081 12.4279 8.3914C12.4056 8.3779 12.3841 8.3636 12.3626 8.3501L12.3419 8.3366C12.166 8.218 12.0076 8.074 11.8675 7.9054C11.8484 7.8823 11.8301 7.8592 11.8078 7.8298L11.7967 7.8155C11.7823 7.7964 11.768 7.7765 11.7545 7.7566L11.7297 7.7208C11.7187 7.7041 11.7083 7.6874 11.698 7.6707C11.6892 7.6564 11.6796 7.642 11.6709 7.6269L11.6566 7.6023C11.4607 7.2641 11.3573 6.8775 11.3573 6.4861L11.3565 6.4861L11.3565 4.101L7.2418 1.7255L7.2219 1.7143L3.0873 4.1042L3.0857 8.8735L7.2203 11.2594L9.2884 10.0661L9.2924 10.0645Z`,
|
|
8
9
|
meta: `M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z`,
|
|
9
10
|
zai: `M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z`,
|
|
10
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-logos.js","sourceRoot":"","sources":["../src/provider-logos.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,MAAM,EAAE,qxDAAqxD;IAC7xD,KAAK,EAAE,s7CAAs7C;IAC77C,IAAI,EAAE,8iBAA8iB;IAEpjB,IAAI,EAAE,iDAAiD;IACvD,MAAM,EAAE,8RAA8R;IAEtS,MAAM,EAAE,0VAA0V;IAElW,IAAI,EAAE,ksCAAksC;IAExsC,GAAG,EAAE,yHAAyH;CACxH,CAAC;AAMX,MAAM,cAAc,GAA+B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAoB,EAAyB,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"provider-logos.js","sourceRoot":"","sources":["../src/provider-logos.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,MAAM,EAAE,qxDAAqxD;IAC7xD,KAAK,EAAE,s7CAAs7C;IAC77C,IAAI,EAAE,8iBAA8iB;IAEpjB,IAAI,EAAE,iDAAiD;IACvD,MAAM,EAAE,8RAA8R;IAEtS,MAAM,EAAE,0VAA0V;IAElW,KAAK,EAAE,gzFAAgzF;IAEvzF,IAAI,EAAE,ksCAAksC;IAExsC,GAAG,EAAE,yHAAyH;CACxH,CAAC;AAMX,MAAM,cAAc,GAA+B,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAoB,EAAyB,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/constants",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.333.0",
|
|
4
4
|
"description": "Shared constants for the intentic packages, ports, paths, and image references the daemon, CLIs and desktop app all agree on",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
100
|
"build": "tsgo",
|
|
101
|
-
"typecheck": "
|
|
101
|
+
"typecheck": "bun check -p tsconfig.test.json",
|
|
102
102
|
"watch": "tsgo --build --watch",
|
|
103
103
|
"test": "suites",
|
|
104
104
|
"test:watch": "suites --watch"
|
|
@@ -40,6 +40,10 @@ const SHIPPED_HEAVY_COMMANDS = Object.freeze({
|
|
|
40
40
|
pattern: "--watch|--lsp\\b|\\bnodemon\\b|\\b(pnpm|npm|yarn|bun)\\s+(run\\s+)?(dev|serve|start)\\b",
|
|
41
41
|
exempt: true,
|
|
42
42
|
},
|
|
43
|
+
// A turbo dry run plans a graph and hashes its inputs; it compiles and tests nothing, so it never needs a slot.
|
|
44
|
+
// The turn check and the cache warmer each plan one as a turn ends, and queued behind two typechecks a plan waited
|
|
45
|
+
// longer than the whole Stop allows.
|
|
46
|
+
{ id: "turbo-dry-run", pattern: "^turbo\\b.*\\s--dry(-run)?(=\\S+)?(\\s|$)", exempt: true },
|
|
43
47
|
// A repo-wide verification, one at a time in the same pool: two of them are the most expensive thing that can
|
|
44
48
|
// happen to a sandbox at once (measured: 24.9 GiB against a 16 GiB cap), and the second is usually the same
|
|
45
49
|
// work over the same tree, which turbo's cache makes nearly free once the first is done. Never two at once,
|