@weave-apps/sdk 0.1.1 → 0.1.2

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 (3) hide show
  1. package/README.md +0 -18
  2. package/bin/init.js +15 -2
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -11,24 +11,6 @@ Official SDK for building third-party applications for the Weave Platform.
11
11
  - ✅ **DOM API** - Secure parent page DOM manipulation
12
12
  - ✅ **Shadow DOM Isolation** - Scoped styles and encapsulation
13
13
 
14
- ## Installation
15
-
16
- Install directly from GitHub:
17
-
18
- ```bash
19
- npm install github:your-org/weave-app-sdk
20
- ```
21
-
22
- Or add to your `package.json`:
23
-
24
- ```json
25
- {
26
- "devDependencies": {
27
- "@weave/app-sdk": "github:your-org/weave-app-sdk"
28
- }
29
- }
30
- ```
31
-
32
14
  ## Quick Start
33
15
 
34
16
  ### 1. Initialize a New App
package/bin/init.js CHANGED
@@ -8,7 +8,20 @@
8
8
 
9
9
  const fs = require('fs');
10
10
  const path = require('path');
11
- const { execSync } = require('child_process');
11
+ const sdkPackageJsonPath = path.join(__dirname, '..', 'package.json');
12
+
13
+ // Read SDK version from its package.json
14
+ const sdkPackageJson = JSON.parse(fs.readFileSync(sdkPackageJsonPath, 'utf8'));
15
+
16
+ let sdkVersion;
17
+ if (fs.existsSync(sdkPackageJsonPath)) {
18
+ try {
19
+ const sdkPackageJson = JSON.parse(fs.readFileSync(sdkPackageJsonPath, 'utf8'));
20
+ sdkVersion = `^${sdkPackageJson.version}`;
21
+ } catch (err) {
22
+ console.warn('⚠️ Warning: Could not read SDK version from package.json, using fallback');
23
+ }
24
+ }
12
25
 
13
26
  const args = process.argv.slice(2);
14
27
  const appName = args[0];
@@ -50,7 +63,7 @@ const packageJson = {
50
63
  clean: 'rm -rf dist'
51
64
  },
52
65
  devDependencies: {
53
- '@weave/app-sdk': 'github:your-org/weave-app-sdk'
66
+ '@weave-apps/sdk': sdkVersion
54
67
  }
55
68
  };
56
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weave-apps/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "SDK for building Weave Micro Apps",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,6 +9,7 @@
9
9
  "types": "dist/index.d.ts",
10
10
  "bin": {
11
11
  "weave-init": "./bin/init.js",
12
+ "@weave-apps/sdk": "./bin/init.js",
12
13
  "weave-build": "./bin/build.js",
13
14
  "weave-compile": "./bin/compile.js"
14
15
  },