@1password/sdk 0.1.0-beta.6 → 0.1.0-beta.7

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 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/). You can create service accounts if you're an owner or administrator on your team. Otherwise, ask your administrator for a service account token.
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
@@ -10,4 +10,5 @@ type Auth = string;
10
10
  * @returns The client configuration to instantiate the client with.
11
11
  */
12
12
  export declare const clientAuthConfig: (userConfig: ClientConfiguration) => ClientAuthConfig;
13
+ export declare const getOsName: () => string;
13
14
  export {};
@@ -23,7 +23,7 @@ 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
29
  const VERSION = "0010001"; // v0.1.0
@@ -42,10 +42,18 @@ const clientAuthConfig = (userConfig) => {
42
42
  integrationVersion: userConfig.integrationVersion,
43
43
  requestLibraryName: "Fetch API",
44
44
  requestLibraryVersion: "Fetch API",
45
- // Only supported on Node.js
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.6",
3
+ "version": "0.1.0-beta.7",
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-real": "cp ../README.md . && npm publish --tag beta && npm dist-tag add @1password/sdk@beta latest && rm ./README.md"
13
+ "publish-beta": "cp ../README.md . && npm publish --tag beta && rm ./README.md"
14
14
  },
15
15
  "author": "1Password",
16
16
  "license": "MIT",