create-coline-app 2.0.0 → 2.1.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/package.json +1 -1
- package/src/cli.ts +2 -0
- package/src/dev.ts +3 -1
- package/src/push.ts +8 -2
- package/templates/backendless/package.json +1 -1
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -13,6 +13,8 @@ Options:
|
|
|
13
13
|
--base-url <url> Coline instance URL (default: $COLINE_BASE_URL or https://coline.app)
|
|
14
14
|
--api-key <key> Workspace API key with the apps.write scope (default: $COLINE_API_KEY)
|
|
15
15
|
--version <semver> Version to publish (default: package.json version, then a dev stamp)
|
|
16
|
+
--internal Workspace-internal app: owned by the API key's workspace,
|
|
17
|
+
skips store review, and goes live immediately
|
|
16
18
|
|
|
17
19
|
The API key is created in Workspace Settings → API. Pushed versions land
|
|
18
20
|
in your developer console in draft review state; pin them from there
|
package/src/dev.ts
CHANGED
|
@@ -19,9 +19,11 @@ export async function runDev(argv: string[]): Promise<number> {
|
|
|
19
19
|
}
|
|
20
20
|
pushing = true;
|
|
21
21
|
try {
|
|
22
|
+
// Fixed -dev version: the server hot-swaps it in place (plan §D5)
|
|
23
|
+
// so watch mode never spams version rows.
|
|
22
24
|
const result = await pushAppVersion({
|
|
23
25
|
...config,
|
|
24
|
-
version:
|
|
26
|
+
version: config.version ?? "0.0.0-dev",
|
|
25
27
|
});
|
|
26
28
|
console.log(`[${new Date().toLocaleTimeString()}] pushed ${result.appKey}@${result.version}`);
|
|
27
29
|
} catch (error) {
|
package/src/push.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { join, relative, resolve } from "node:path";
|
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
7
|
-
import { argValue } from "./args";
|
|
7
|
+
import { argValue, hasFlag } from "./args";
|
|
8
8
|
|
|
9
9
|
interface ManifestSummary {
|
|
10
10
|
key: string;
|
|
@@ -18,6 +18,8 @@ export interface PushConfig {
|
|
|
18
18
|
baseUrl: string;
|
|
19
19
|
apiKey: string;
|
|
20
20
|
version: string | null;
|
|
21
|
+
/** Workspace-internal app: owned by the API key's workspace, skips store review. */
|
|
22
|
+
internal: boolean;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export interface PushResult {
|
|
@@ -47,6 +49,7 @@ export function resolvePushConfig(argv: readonly string[]): PushConfig {
|
|
|
47
49
|
).replace(/\/+$/, ""),
|
|
48
50
|
apiKey,
|
|
49
51
|
version: argValue(argv, "--version"),
|
|
52
|
+
internal: hasFlag(argv, "--internal"),
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
55
|
|
|
@@ -180,6 +183,7 @@ export async function pushAppVersion(config: PushConfig): Promise<PushResult> {
|
|
|
180
183
|
manifest,
|
|
181
184
|
logicBundleJs,
|
|
182
185
|
clientSource,
|
|
186
|
+
internal: config.internal,
|
|
183
187
|
}),
|
|
184
188
|
},
|
|
185
189
|
);
|
|
@@ -209,7 +213,9 @@ export async function runPush(argv: string[]): Promise<number> {
|
|
|
209
213
|
const result = await pushAppVersion(config);
|
|
210
214
|
console.log(
|
|
211
215
|
`Pushed ${result.appKey}@${result.version} (version ${result.versionId}).\n` +
|
|
212
|
-
|
|
216
|
+
(config.internal
|
|
217
|
+
? "Internal app: the version is live in your workspace — install or update it from the Apps page."
|
|
218
|
+
: "The version is in draft review state — pin or submit it from the developer console."),
|
|
213
219
|
);
|
|
214
220
|
return 0;
|
|
215
221
|
}
|