@iwsdk/cli 0.5.0 → 0.5.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Meta Platforms, Inc. and affiliates.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -12,6 +12,16 @@ It owns:
12
12
  - runtime-resolved MCP stdio access
13
13
  - direct runtime control commands
14
14
 
15
+ ## Running without a local install
16
+
17
+ Starter apps install this package and should run `npx iwsdk ...` from the app
18
+ directory. Elsewhere, use the scoped package explicitly so npm does not resolve
19
+ the unrelated `iwsdk` placeholder package:
20
+
21
+ ```bash
22
+ npm exec --package @iwsdk/cli -- iwsdk --help
23
+ ```
24
+
15
25
  ## Coding-agent adapters
16
26
 
17
27
  `iwsdk adapter sync` preserves unrelated settings while configuring the native
package/bin/iwsdk.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ import { existsSync } from 'fs';
10
+ import { fileURLToPath } from 'url';
11
+
12
+ const entrypoint = new URL('../dist/cli.js', import.meta.url);
13
+ if (!existsSync(fileURLToPath(entrypoint))) {
14
+ console.error(
15
+ 'The local @iwsdk/cli package has not been built. Run "corepack pnpm@10.18.3 --filter @iwsdk/cli build" from the immersive-web-sdk repository, then retry.',
16
+ );
17
+ process.exitCode = 1;
18
+ } else {
19
+ await import(entrypoint.href);
20
+ }