@1password/sdk 0.1.0-beta.6 → 0.1.0-beta.8
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 +3 -3
- package/dist/configuration.d.ts +1 -0
- package/dist/configuration.js +12 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -18,16 +18,16 @@ The 1Password JavaScript SDK offers programmatic access to your secrets in 1Pass
|
|
|
18
18
|
|
|
19
19
|
## 🔑 Authentication
|
|
20
20
|
|
|
21
|
-
1Password SDKs support authentication with [1Password Service Accounts](https://developer.1password.com/docs/service-accounts/get-started/).
|
|
21
|
+
1Password SDKs support authentication with [1Password Service Accounts](https://developer.1password.com/docs/service-accounts/get-started/).
|
|
22
22
|
|
|
23
23
|
Before you get started, [create a service account](https://developer.1password.com/docs/service-accounts/get-started/#create-a-service-account) and give it the appropriate permissions in the vaults where the items you want to use with the SDK are saved.
|
|
24
24
|
|
|
25
25
|
## ❗ Limitations
|
|
26
26
|
|
|
27
|
-
1Password SDKs currently only support operations on text and concealed fields. If you update or delete an item that has information saved in other field types, that information will be permanently lost.
|
|
28
|
-
|
|
29
27
|
1Password SDKs don't yet support using secret references with query parameters, so you can't retrieve file attachments or SSH keys, or get more information about field metadata.
|
|
30
28
|
|
|
29
|
+
1Password SDKs currently only support operations on text and concealed fields. As a result, you can't edit items that include information saved in other types of fields.
|
|
30
|
+
|
|
31
31
|
When managing items with 1Password SDKs, you must use [unique identifiers (IDs)](https://developer.1password.com/docs/sdks/concepts#unique-identifiers) in place of vault, item, and field names.
|
|
32
32
|
|
|
33
33
|
## 🚀 Get started
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -23,10 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.clientAuthConfig = void 0;
|
|
26
|
+
exports.getOsName = exports.clientAuthConfig = void 0;
|
|
27
27
|
const os = __importStar(require("os"));
|
|
28
28
|
const LANGUAGE = "JS";
|
|
29
|
-
const VERSION = "
|
|
29
|
+
const VERSION = "0010008"; // v0.1.0-beta.8
|
|
30
30
|
/**
|
|
31
31
|
* Creates a default client configuration.
|
|
32
32
|
* @returns The client configuration to instantiate the client with.
|
|
@@ -42,10 +42,18 @@ const clientAuthConfig = (userConfig) => {
|
|
|
42
42
|
integrationVersion: userConfig.integrationVersion,
|
|
43
43
|
requestLibraryName: "Fetch API",
|
|
44
44
|
requestLibraryVersion: "Fetch API",
|
|
45
|
-
|
|
46
|
-
os: os.type().toLowerCase(),
|
|
45
|
+
os: (0, exports.getOsName)(),
|
|
47
46
|
osVersion: defaultOsVersion,
|
|
48
47
|
architecture: os.arch(),
|
|
49
48
|
};
|
|
50
49
|
};
|
|
51
50
|
exports.clientAuthConfig = clientAuthConfig;
|
|
51
|
+
const getOsName = () => {
|
|
52
|
+
// Only supported on Node.js
|
|
53
|
+
const os_name = os.type().toLowerCase();
|
|
54
|
+
if (os_name === "windows_nt") {
|
|
55
|
+
return "windows";
|
|
56
|
+
}
|
|
57
|
+
return os_name;
|
|
58
|
+
};
|
|
59
|
+
exports.getOsName = getOsName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1password/sdk",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.8",
|
|
4
4
|
"description": "The 1Password JavaScript SDK offers programmatic read access to your secrets in 1Password in an interface native to JavaScript. The SDK currently supports `Node.JS`",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"eslint": "eslint -c .eslintrc.json 'src/*.ts'",
|
|
11
11
|
"prepare": "rm -rf ./dist && npm run build",
|
|
12
12
|
"publish-test": "cp ../README.md . && npm publish --tag beta --dry-run && rm ./README.md",
|
|
13
|
-
"publish-
|
|
13
|
+
"publish-beta": "cp ../README.md . && npm publish --tag beta && rm ./README.md"
|
|
14
14
|
},
|
|
15
15
|
"author": "1Password",
|
|
16
16
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"main": "./dist/sdk.js",
|
|
27
27
|
"types": "./dist/sdk.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@1password/sdk-core": "0.1.0-beta.
|
|
29
|
+
"@1password/sdk-core": "0.1.0-beta.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@1password/eslint-config": "^4.0.0",
|