@arisnetxsolutions/quantum-core-sdk 1.0.1 → 1.0.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 (2) hide show
  1. package/README.md +29 -51
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -4,7 +4,8 @@ Type-safe TypeScript library for consuming content from your QuantumCore Headles
4
4
 
5
5
  ## Installation
6
6
  ```bash
7
- npm install @quantum-core/sdk
7
+ # replace with the actual package name once published
8
+ npm install @arisnetxsolutions/quantum-core-sdk
8
9
  ```
9
10
 
10
11
  ## Usage
@@ -40,61 +41,38 @@ const images = await cms2.gallery.getAll();
40
41
  - **Simplified API**: Simple methods for blog and gallery content.
41
42
 
42
43
  ## Publishing to npm
43
- When you're ready to release a new version of the SDK, follow these steps:
44
-
45
- 1. **Update the version** in `packages/sdk/package.json` (use semantic versioning).
46
- make sure the `name` field is set to `@quantum-core/sdk` so you publish to the
47
- scoped namespace rather than the global `sdk` package. Note that the scope
48
- must exist: either create an **organization** called `quantum-core` on
49
- <https://www.npmjs.com/org> or use `npm org create quantum-core` (if you have a
50
- paid account). You will also need to be a member of that org. If the scope does
51
- not exist the publish attempt will return a 404 with "Scope not found".
52
- Alternatively, if you don't want a scope you can choose an unscoped name like
53
- `@quantumcoresdk` or simply `quantum-core-sdk`.
54
- 2. Run `npm run build` from `packages/sdk` to ensure `dist/` is up to date.
55
- 3. Log in to npm if you haven't already:
44
+ 1. Ensure the `name` field in `packages/sdk/package.json` reflects the
45
+ package you intend to publish (currently `@arisnetxsolutions/quantum-core-sdk`).
46
+ The scope (`@arisnetxsolutions`) must already exist as an npm organization
47
+ and you must have publish rights in it. Create it at
48
+ <https://www.npmjs.com/org> or run `npm org create arisnetxsolutions` if your
49
+ account allows. Without the scope the CLI will return a 404 "Scope not found".
50
+ If you prefer not to use a scope, choose an unscoped name such as
51
+ `quantum-core-sdk` instead.
52
+ 2. Update the version (semantic versioning) and commit the change.
53
+ 3. Run `npm run build` to regenerate `dist/`.
54
+ 4. Authenticate using an OTP or a token with 2FA bypass:
56
55
  ```bash
57
- cd packages/sdk
56
+ # interactive
58
57
  npm login
58
+ # you will be prompted for a 2FA code
59
+
60
+ # or with an environment token
61
+ export NPM_TOKEN="<your-token>"
62
+ npm publish --access public
59
63
  ```
60
- 4. Publish the package:
64
+ (on Windows set the variable with `setx` or choose the command-line flag
65
+ `--//registry.npmjs.org/:_authToken=$NPM_TOKEN`).
66
+ 5. Publish:
61
67
  ```bash
68
+ cd packages/sdk
62
69
  npm publish --access public
63
70
  ```
64
- The `--access public` flag is still required for scoped packages. If your npm
65
- account has two‑factor authentication enabled you'll encounter a 403 unless you
66
- either:
67
-
68
- * run `npm login` and enter the one‑time 2FA code when prompted (interactive). You
69
- can also supply the OTP during publish with `npm publish --otp=<code>`.
70
- * or, for automation or CI, create a **publish token** with `automation=publish`
71
- and `bypass 2fa` from your npm account settings and export it as `NPM_TOKEN`.
72
- For example:
73
- ```bash
74
- export NPM_TOKEN="<your-token>"
75
- npm publish --access public
76
- ```
77
- (on Windows `setx NPM_TOKEN "<your-token>"` or use the appropriate method).
78
-
79
- The error message in your last attempt:
80
-
81
- > npm error 403 Forbidden - Two-factor authentication or granular access token
82
- > with bypass 2fa enabled is required to publish packages.
83
-
84
- indicates the credentials used by the CLI did not have bypass permission; the
85
- login command you ran (`npm login automation=publish, bypass 2fa`) does not
86
- actually attach a token to subsequent requests, which is why the publish still
87
- failed. Use a real token or interactive login/OTP approach instead.
88
71
 
89
- Also be sure you don't accidentally publish your local `.env` file the
90
- included `.npmignore` now explicitly lists `.env` to prevent that.
72
+ If you still see a 404, it means the scope doesn’t exist or you lack
73
+ permissions; 403 indicates a 2FA issue.
74
+ The `publish` script in `package.json` currently embeds a token – be
75
+ cautious about committing that to source control.
91
76
 
92
- > The package name (`@quantum-core/sdk`) is scoped, so `--access public` is required
93
- > for public registries. You can also run `npm version patch|minor|major` to bump the
94
- > version and automatically create a git tag before publishing.
95
- >
96
- > Make sure you have access to the `@quantum-core` scope on npm (ask the org owner to
97
- > add you if necessary). If 2FA is enabled, either publish with a token that allows
98
- > bypassing 2FA or use `npm login` + one‑time code.
99
- >
100
- >Your changes should be committed and tagged in Git before publishing.
77
+ 6. After publishing, update installation instructions above with the
78
+ real package name and bump the version for future releases.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@arisnetxsolutions/quantum-core-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "npx tsc",
9
- "publish": "npm publish --access public --//registry.npmjs.org/:_authToken=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",
9
+ "publish": "npm publish --access public --//registry.npmjs.org/:_authToken=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",
10
10
  "test": "echo \"Error: no test specified\" && exit 1"
11
11
  },
12
12
  "keywords": [],
@@ -21,4 +21,4 @@
21
21
  "devDependencies": {
22
22
  "@types/node": "^25.4.0"
23
23
  }
24
- }
24
+ }