@arisnetxsolutions/quantum-core-sdk 1.0.1 → 1.0.3
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/README.md +29 -51
- package/package.json +3 -4
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
|
-
|
|
7
|
+
# replace with the actual package name once published
|
|
8
|
+
npm install 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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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 `quantum-core-sdk`).
|
|
46
|
+
Since this is now an **unscoped** package there is no need to create an npm
|
|
47
|
+
organization or worry about scope permissions; simply pick a name that isn’t
|
|
48
|
+
already taken on the registry. If you ever switch back to a scoped name, the
|
|
49
|
+
rules earlier in this document about creating the scope and having publish
|
|
50
|
+
rights apply.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
90
|
-
|
|
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
|
-
|
|
93
|
-
|
|
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,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arisnetxsolutions/quantum-core-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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=
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
"publish": "npm publish --access public --//registry.npmjs.org/:_authToken=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"
|
|
11
10
|
},
|
|
12
11
|
"keywords": [],
|
|
13
12
|
"author": "",
|
|
@@ -21,4 +20,4 @@
|
|
|
21
20
|
"devDependencies": {
|
|
22
21
|
"@types/node": "^25.4.0"
|
|
23
22
|
}
|
|
24
|
-
}
|
|
23
|
+
}
|