@phreshos/node 0.1.18 → 0.1.19

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.
Files changed (2) hide show
  1. package/dist/project.js +8 -1
  2. package/package.json +3 -3
package/dist/project.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isRelativeValue, layers, } from "@phreshos/core";
1
+ import { isRelativeValue, parseLaunch, layers, } from "@phreshos/core";
2
2
  import AdmZip from "adm-zip";
3
3
  import { createHash } from "node:crypto";
4
4
  import { spawn } from "node:child_process";
@@ -66,6 +66,8 @@ export class Project {
66
66
  name: config.name,
67
67
  version: config.version,
68
68
  description: config.description,
69
+ options: config.options,
70
+ startup: config.startup,
69
71
  categories: config.categories,
70
72
  keywords: config.keywords,
71
73
  website: config.website,
@@ -219,6 +221,9 @@ function clientHalf(half, mode, developmentUrl) {
219
221
  : declared;
220
222
  }
221
223
  function validateConfig(config) {
224
+ parseLaunch({ options: config.options });
225
+ if (config.startup !== undefined && typeof config.startup !== "boolean")
226
+ parseLaunch(config.startup);
222
227
  if (typeof config.identity !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(config.identity)) {
223
228
  throw new Error("A Program's identity must be kebab-case");
224
229
  }
@@ -315,6 +320,8 @@ function packageDefinition(config, version) {
315
320
  name: config.name,
316
321
  version,
317
322
  description: config.description,
323
+ options: config.options,
324
+ startup: config.startup,
318
325
  icon: config.icon ? "icon.png" : undefined,
319
326
  agent: config.agent ? "agent.md" : undefined,
320
327
  categories: config.categories,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phreshos/node",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Node.js access to PhreshOS and Program projects.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -42,10 +42,10 @@
42
42
  "jiti": "^2.7.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@phreshos/core": "^0.1.43"
45
+ "@phreshos/core": "^0.1.44"
46
46
  },
47
47
  "devDependencies": {
48
- "@phreshos/core": "^0.1.43",
48
+ "@phreshos/core": "^0.1.44",
49
49
  "@types/adm-zip": "^0.5.8",
50
50
  "@types/node": "^26.2.0",
51
51
  "typescript": "^6.0.3",