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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-coline-app",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Scaffold, push, and iterate on Coline Apps.",
5
5
  "type": "module",
6
6
  "bin": {
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: `0.0.${Math.floor(Date.now() / 1000)}`,
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
- "The version is in draft review state — pin or submit it from the developer console.",
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
  }
@@ -10,7 +10,7 @@
10
10
  "dev": "coline-app dev"
11
11
  },
12
12
  "dependencies": {
13
- "@colineapp/sdk": "^0.2.0",
13
+ "@colineapp/sdk": "^0.3.0",
14
14
  "zod": "^4.0.0"
15
15
  },
16
16
  "devDependencies": {