@cerios/salesforce-sobjectly 0.0.0-stage → 1.0.0

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/package.json CHANGED
@@ -1,6 +1,113 @@
1
1
  {
2
- "name": "@cerios/salesforce-sobjectly",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@cerios/salesforce-sobjectly",
3
+ "version": "1.0.0",
4
+ "description": "Type-safe Salesforce REST API client for TypeScript. Generated SObject types, a typed SOQL builder, CRUD, composite, sObject collections, SOSL, invocable actions/Flow, Tooling API and Bulk API 2.0.",
5
+ "keywords": [
6
+ "api",
7
+ "bulk-api",
8
+ "cerios",
9
+ "codegen",
10
+ "composite",
11
+ "crm",
12
+ "rest",
13
+ "salesforce",
14
+ "sobject",
15
+ "soql",
16
+ "sosl",
17
+ "tooling-api",
18
+ "type-safe",
19
+ "typescript"
20
+ ],
21
+ "homepage": "https://github.com/CeriosTesting/salesforce-sobjectly#readme",
22
+ "bugs": {
23
+ "url": "https://github.com/CeriosTesting/salesforce-sobjectly/issues"
24
+ },
25
+ "license": "MIT",
26
+ "author": "Ronald Veth - Cerios",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/CeriosTesting/salesforce-sobjectly.git"
30
+ },
31
+ "bin": {
32
+ "sobjectly": "dist/cli.cjs"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "sobjectly.config.schema.json"
37
+ ],
38
+ "type": "commonjs",
39
+ "sideEffects": false,
40
+ "main": "./dist/index.cjs",
41
+ "module": "./dist/index.mjs",
42
+ "types": "./dist/index.d.cts",
43
+ "exports": {
44
+ ".": {
45
+ "import": {
46
+ "types": "./dist/index.d.mts",
47
+ "default": "./dist/index.mjs"
48
+ },
49
+ "require": {
50
+ "types": "./dist/index.d.cts",
51
+ "default": "./dist/index.cjs"
52
+ }
53
+ },
54
+ "./codegen": {
55
+ "import": {
56
+ "types": "./dist/codegen.d.mts",
57
+ "default": "./dist/codegen.mjs"
58
+ },
59
+ "require": {
60
+ "types": "./dist/codegen.d.cts",
61
+ "default": "./dist/codegen.cjs"
62
+ }
63
+ },
64
+ "./sobjectly.config.schema.json": "./sobjectly.config.schema.json",
65
+ "./package.json": "./package.json"
66
+ },
67
+ "publishConfig": {
68
+ "access": "public",
69
+ "provenance": true
70
+ },
71
+ "scripts": {
72
+ "build": "tsdown",
73
+ "changeset": "changeset",
74
+ "check-exports": "attw --pack . --profile node16",
75
+ "compile": "tsc --noEmit",
76
+ "deps:update": "npx npm-check-updates -u --dep prod,dev,optional,peer,packageManager --install never && npm install",
77
+ "format": "oxfmt",
78
+ "format:check": "oxfmt --check",
79
+ "lint": "oxlint --type-aware",
80
+ "lint:fix": "oxlint --type-aware --fix",
81
+ "pack": "npm pack",
82
+ "prepare": "husky",
83
+ "release": "changeset publish",
84
+ "test": "vitest --run",
85
+ "test:coverage": "vitest --run --coverage",
86
+ "test:integration": "vitest --run --config vitest.integration.config.mts",
87
+ "test:smoke": "node scripts/smoke.mjs",
88
+ "test:watch": "vitest --watch",
89
+ "version-packages": "changeset version",
90
+ "version-packages:prepare-release": "npm run version-packages && npm run format"
91
+ },
92
+ "dependencies": {
93
+ "jiti": "^2.7.0"
94
+ },
95
+ "devDependencies": {
96
+ "@arethetypeswrong/cli": "^0.18.5",
97
+ "@changesets/cli": "^3.0.3",
98
+ "@types/node": "^26.6.3",
99
+ "@vitest/coverage-v8": "5.0.3",
100
+ "husky": "^9.1.7",
101
+ "lint-staged": "^17.6.0",
102
+ "npm-check-updates": "^23.1.0",
103
+ "oxfmt": "^0.71.0",
104
+ "oxlint": "^1.86.0",
105
+ "oxlint-tsgolint": "^7.0.2003",
106
+ "tsdown": "^0.23.0",
107
+ "typescript": "^7.0.2",
108
+ "vitest": "^5.0.3"
109
+ },
110
+ "engines": {
111
+ "node": ">=20.19.0"
112
+ }
113
+ }
@@ -0,0 +1,147 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://unpkg.com/@cerios/salesforce-sobjectly/sobjectly.config.schema.json",
4
+ "title": "sobjectly config",
5
+ "description": "Configuration for `sobjectly generate` (@cerios/salesforce-sobjectly).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["apiVersion", "output"],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "The JSON Schema for this file."
13
+ },
14
+ "apiVersion": {
15
+ "type": "string",
16
+ "pattern": "^v\\d+\\.\\d+$",
17
+ "description": "The Salesforce REST API version to describe with, e.g. \"v66.0\". Exported as API_VERSION in the generated file.",
18
+ "examples": ["v66.0"]
19
+ },
20
+ "output": {
21
+ "type": "string",
22
+ "pattern": "\\.(ts|mts|cts)$",
23
+ "description": "The generated TypeScript file, relative to this config file.",
24
+ "examples": ["src/generated/sobjects.ts"]
25
+ },
26
+ "sobjects": {
27
+ "type": "array",
28
+ "description": "The sObjects to generate types for. Without it, every queryable sObject is generated.",
29
+ "items": { "$ref": "#/definitions/sobjectName" },
30
+ "examples": [["Account", "Contact"]]
31
+ },
32
+ "exclude": {
33
+ "type": "array",
34
+ "description": "sObjects to skip.",
35
+ "items": { "$ref": "#/definitions/sobjectName" }
36
+ },
37
+ "auth": {
38
+ "description": "How the generator logs in. Credentials are read from environment variables. Defaults to client credentials from SF_LOGIN_URL, SF_CLIENT_ID and SF_CLIENT_SECRET.",
39
+ "oneOf": [
40
+ {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["type"],
44
+ "properties": {
45
+ "type": { "const": "clientCredentials" },
46
+ "loginUrlEnv": {
47
+ "$ref": "#/definitions/envName",
48
+ "description": "Defaults to SF_LOGIN_URL (your My Domain URL)."
49
+ },
50
+ "clientIdEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_CLIENT_ID." },
51
+ "clientSecretEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_CLIENT_SECRET." }
52
+ }
53
+ },
54
+ {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["type"],
58
+ "properties": {
59
+ "type": { "const": "accessToken" },
60
+ "accessTokenEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_ACCESS_TOKEN." },
61
+ "instanceUrlEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_INSTANCE_URL." }
62
+ }
63
+ },
64
+ {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": ["type"],
68
+ "properties": {
69
+ "type": { "const": "jwtBearer" },
70
+ "loginUrlEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_LOGIN_URL." },
71
+ "clientIdEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_CLIENT_ID." },
72
+ "usernameEnv": { "$ref": "#/definitions/envName", "description": "Defaults to SF_USERNAME." },
73
+ "privateKeyEnv": {
74
+ "$ref": "#/definitions/envName",
75
+ "description": "The PEM key itself. Defaults to SF_PRIVATE_KEY."
76
+ },
77
+ "privateKeyPathEnv": {
78
+ "$ref": "#/definitions/envName",
79
+ "description": "A path to the PEM key file. Defaults to SF_PRIVATE_KEY_PATH."
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": ["type"],
87
+ "properties": {
88
+ "type": { "const": "sfCli" },
89
+ "targetOrg": {
90
+ "type": "string",
91
+ "minLength": 1,
92
+ "description": "The Salesforce CLI org alias or username. Defaults to the CLI's default org."
93
+ }
94
+ }
95
+ }
96
+ ]
97
+ },
98
+ "excludeCreateFields": {
99
+ "$ref": "#/definitions/fieldMap",
100
+ "description": "Per sObject, fields to leave out of the create input."
101
+ },
102
+ "excludeUpdateFields": {
103
+ "$ref": "#/definitions/fieldMap",
104
+ "description": "Per sObject, fields to leave out of the update input."
105
+ },
106
+ "picklists": {
107
+ "enum": ["union", "string"],
108
+ "description": "\"union\" (default): picklists become unions of their values. \"string\": plain strings."
109
+ },
110
+ "constants": {
111
+ "type": "boolean",
112
+ "description": "Emit the PICKLIST_VALUES and RECORD_TYPES runtime constants. Defaults to true."
113
+ },
114
+ "concurrency": {
115
+ "type": "integer",
116
+ "minimum": 1,
117
+ "description": "Parallel describe calls. Defaults to 10."
118
+ },
119
+ "continueOnDescribeError": {
120
+ "type": "boolean",
121
+ "description": "Skip sObjects whose describe fails instead of failing the run. Defaults to false."
122
+ },
123
+ "importSource": {
124
+ "type": "string",
125
+ "minLength": 1,
126
+ "description": "Where the generated file imports helper types from. Defaults to \"@cerios/salesforce-sobjectly\"."
127
+ }
128
+ },
129
+ "definitions": {
130
+ "sobjectName": {
131
+ "type": "string",
132
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
133
+ },
134
+ "envName": {
135
+ "type": "string",
136
+ "minLength": 1
137
+ },
138
+ "fieldMap": {
139
+ "type": "object",
140
+ "propertyNames": { "$ref": "#/definitions/sobjectName" },
141
+ "additionalProperties": {
142
+ "type": "array",
143
+ "items": { "type": "string", "minLength": 1 }
144
+ }
145
+ }
146
+ }
147
+ }