@_linked/org 1.0.2 → 1.1.1

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/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ package-lock.json linguist-generated=true -diff merge=ours
@@ -0,0 +1,18 @@
1
+ name: PR
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ checks:
10
+ uses: linked-fw/.github/.github/workflows/pr.yml@v1
11
+ # The changeset reminder posts a PR comment. A reusable workflow only holds what its
12
+ # caller granted, and the org default is read-only.
13
+ permissions:
14
+ contents: read
15
+ pull-requests: write
16
+ with:
17
+ require-tests: false
18
+ run-e2e: false
@@ -1,3 +1,8 @@
1
+ # Calls the shared workflow in linked-fw/.github.
2
+ #
3
+ # This FILENAME is what npm's trusted-publisher check validates — not the shared workflow's.
4
+ # Renaming this file invalidates this package's trusted publisher, and the only symptom is
5
+ # that releases quietly start needing manual approval again.
1
6
  name: Publish
2
7
 
3
8
  on:
@@ -9,46 +14,17 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
9
14
 
10
15
  jobs:
11
16
  release:
12
- name: Publish Release
13
- runs-on: ubuntu-latest
17
+ uses: linked-fw/.github/.github/workflows/publish.yml@v1
14
18
  permissions:
15
19
  contents: write
16
20
  pull-requests: write
17
- steps:
18
- # Author the changesets "Version Packages" PR as the org release App (not the default
19
- # GITHUB_TOKEN) so its CI runs without a manual "Approve and run" gate. Requires the org
20
- # App installed on this repo + org secrets RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY.
21
- - name: Generate GitHub App token
22
- id: app-token
23
- uses: actions/create-github-app-token@v2
24
- with:
25
- app-id: ${{ secrets.RELEASE_APP_ID }}
26
- private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
27
-
28
- - name: Checkout
29
- uses: actions/checkout@v4
30
- with:
31
- token: ${{ steps.app-token.outputs.token }}
32
-
33
- - name: Setup Node.js
34
- uses: actions/setup-node@v4
35
- with:
36
- node-version: 22.16.0
37
- registry-url: 'https://registry.npmjs.org'
38
-
39
- - name: Install dependencies
40
- run: npm ci --legacy-peer-deps
41
-
42
- - name: Build
43
- run: npm run build
44
-
45
- - name: Create release Pull Request or Publish
46
- uses: changesets/action@v1
47
- with:
48
- publish: npx changeset publish
49
- title: 'chore: release'
50
- commit: 'chore: release'
51
- env:
52
- GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
53
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
54
- NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
21
+ # Needed HERE as well as in the shared workflow: a reusable workflow cannot widen the
22
+ # permissions its caller was granted, and without this npm never gets an id-token and
23
+ # every release silently falls back to the approval queue.
24
+ id-token: write
25
+ # Named rather than `inherit`: `inherit` forwards everything this repo can see, which is
26
+ # how a community repo would end up forwarding a first-party token.
27
+ secrets:
28
+ NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
29
+ RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
30
+ RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @\_linked/org
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#10](https://github.com/linked-fw/org/pull/10) [`21fbfed`](https://github.com/linked-fw/org/commit/21fbfedb722c8b70697fc645f98e11cd2fd2ff58) Thanks [@flyon](https://github.com/flyon)! - Declare npm as the package manager for this repo, convert the build scripts off `yarn`, and mark `package-lock.json` as a generated file.
8
+
9
+ ## 1.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`ddadf2b`](https://github.com/linked-cm/org/commit/ddadf2b9da9a5f91afad763ac9bd6c89e0cdec9e) - ESM-only. Dropped the CommonJS build; ships ES modules only (`type: module`, no `require` export condition, no `lib/cjs`). Fixed the root `types` field. CJS consumers on Node 22+ can `require()` it (sync ESM) or use dynamic `import()`.
14
+
3
15
  ## 1.0.2
4
16
 
5
17
  ### Patch Changes
File without changes
@@ -0,0 +1,2 @@
1
+ //import your providers here (providers only run in the backend)
2
+ //# sourceMappingURL=backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/backend.ts"],"names":[],"mappings":"AAAA,gEAAgE"}
@@ -0,0 +1,10 @@
1
+ {
2
+ "@context": {
3
+ "dc": "http://purl.org/dc/elements/1.1/",
4
+ "owl": "http://www.w3.org/2002/07/owl#",
5
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
6
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
7
+ "lincd-org": "http://lincd.org/ont/lincd-org/"
8
+ },
9
+ "@graph": []
10
+ }
@@ -0,0 +1,4 @@
1
+ import './ontologies/org.js';
2
+ import './types.js';
3
+ import './shapes/Membership.js';
4
+ import './shapes/Role.js';
@@ -0,0 +1,9 @@
1
+ import './ontologies/org.js';
2
+ import './types.js';
3
+ //SHAPES FIRST
4
+ // import './shapes/YourShape';
5
+ import './shapes/Membership.js';
6
+ import './shapes/Role.js';
7
+ //THEN COMPONENTS
8
+ // import './components/YourComponent'
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,YAAY,CAAC;AAEpB,cAAc;AACd,+BAA+B;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAE1B,iBAAiB;AACjB,sCAAsC"}
@@ -0,0 +1,38 @@
1
+ import type { NodeReferenceValue } from '@_linked/core/utils/NodeReference';
2
+ /**
3
+ * Load the data of this ontology into memory, thus adding the properties of the entities of this ontology to the local graph.
4
+ */
5
+ export declare var loadData: () => Promise<{
6
+ "@context": {
7
+ dc: string;
8
+ owl: string;
9
+ rdf: string;
10
+ rdfs: string;
11
+ "lincd-org": string;
12
+ };
13
+ "@graph": any[];
14
+ }>;
15
+ /**
16
+ * The namespace of this ontology, which can be used to create NamedNodes with URI's not listed in this file
17
+ */
18
+ export declare var ns: (term: string) => NodeReferenceValue;
19
+ /**
20
+ * The NamedNode of the ontology itself
21
+ */
22
+ export declare var _self: NodeReferenceValue;
23
+ export declare var Membership: NodeReferenceValue;
24
+ export declare var Role: NodeReferenceValue;
25
+ export declare var hasMembership: NodeReferenceValue;
26
+ export declare var Organization: NodeReferenceValue;
27
+ export declare var organization: NodeReferenceValue;
28
+ export declare var member: NodeReferenceValue;
29
+ export declare var role: NodeReferenceValue;
30
+ export declare const org: {
31
+ Membership: NodeReferenceValue;
32
+ Role: NodeReferenceValue;
33
+ hasMembership: NodeReferenceValue;
34
+ Organization: NodeReferenceValue;
35
+ organization: NodeReferenceValue;
36
+ member: NodeReferenceValue;
37
+ role: NodeReferenceValue;
38
+ };
@@ -0,0 +1,40 @@
1
+ import { createNameSpace } from '@_linked/core/utils/NameSpace';
2
+ import { linkedOntology } from '../package.js';
3
+ //import all the exports of this file as one variable called _this (we need this at the end)
4
+ import * as _this from './org.js';
5
+ /**
6
+ * Load the data of this ontology into memory, thus adding the properties of the entities of this ontology to the local graph.
7
+ */
8
+ export var loadData = async () => {
9
+ //@ts-ignore
10
+ return import('../data/lincd-org.json', { with: { type: 'json' } }).then((data) => data.default);
11
+ };
12
+ /**
13
+ * The namespace of this ontology, which can be used to create NamedNodes with URI's not listed in this file
14
+ */
15
+ export var ns = createNameSpace('http://www.w3.org/ns/org#');
16
+ /**
17
+ * The NamedNode of the ontology itself
18
+ */
19
+ export var _self = ns('');
20
+ //A list of all the entities (Classes & Properties) of this ontology, each exported as a NamedNode
21
+ export var Membership = ns('Membership');
22
+ export var Role = ns('Role');
23
+ export var hasMembership = ns('hasMembership');
24
+ export var Organization = ns('Organization');
25
+ export var organization = ns('organization');
26
+ export var member = ns('member');
27
+ export var role = ns('role');
28
+ //An extra grouping object so all the entities can be accessed from the prefix/name
29
+ export const org = {
30
+ Membership,
31
+ Role,
32
+ hasMembership,
33
+ Organization,
34
+ organization,
35
+ member,
36
+ role
37
+ };
38
+ //Registers this ontology to LINCD.JS, so that data loading can be automated amongst other things
39
+ linkedOntology(_this, ns, 'org', loadData, '../data/lincd-org.json');
40
+ //# sourceMappingURL=org.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.js","sourceRoot":"","sources":["../../../src/ontologies/org.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,4FAA4F;AAC5F,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,IAAI,QAAQ,GAAG,KAAK,IAAI,EAAE;IAC/B,YAAY;IACZ,OAAO,MAAM,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnG,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAI,EAAE,GAAG,eAAe,CAAC,2BAA2B,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,IAAI,KAAK,GAAuB,EAAE,CAAC,EAAE,CAAC,CAAC;AAE9C,kGAAkG;AAClG,MAAM,CAAC,IAAI,UAAU,GAAuB,EAAE,CAAC,YAAY,CAAC,CAAC;AAC7D,MAAM,CAAC,IAAI,IAAI,GAAuB,EAAE,CAAC,MAAM,CAAC,CAAC;AACjD,MAAM,CAAC,IAAI,aAAa,GAAuB,EAAE,CAAC,eAAe,CAAC,CAAC;AACnE,MAAM,CAAC,IAAI,YAAY,GAAuB,EAAE,CAAC,cAAc,CAAC,CAAC;AACjE,MAAM,CAAC,IAAI,YAAY,GAAuB,EAAE,CAAC,cAAc,CAAC,CAAC;AACjE,MAAM,CAAC,IAAI,MAAM,GAAuB,EAAE,CAAC,QAAQ,CAAC,CAAC;AACrD,MAAM,CAAC,IAAI,IAAI,GAAuB,EAAE,CAAC,MAAM,CAAC,CAAC;AAEjD,mFAAmF;AACnF,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,UAAU;IACV,IAAI;IACJ,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,MAAM;IACN,IAAI;CACL,CAAC;AAEF,iGAAiG;AACjG,cAAc,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const linkedShape: {
2
+ <T extends typeof import("@_linked/core/shapes/Shape").Shape>(constructor: T): void;
3
+ <T extends typeof import("@_linked/core/shapes/Shape").Shape>(config?: import("@_linked/core/utils/Package").ShapeConfig): (constructor: T) => void;
4
+ }, linkedUtil: (constructor: any) => any, linkedOntology: (allFileExports: any, nameSpace: (term: string) => import("@_linked/core/utils/NodeReference").NodeReferenceValue, suggestedPrefixAndFileName: string, loadDataFunction?: () => Promise<any>, dataSource?: string | string[]) => void, registerPackageExport: (exportedObject: any) => void, packageExports: any, packageName: string, getPackageShape: (name: string) => import("@_linked/core/shapes/Shape").ShapeConstructor | undefined;
@@ -0,0 +1,3 @@
1
+ import { linkedPackage } from '@_linked/core/utils/Package';
2
+ export const { linkedShape, linkedUtil, linkedOntology, registerPackageExport, packageExports, packageName, getPackageShape } = linkedPackage('@_linked/org');
3
+ //# sourceMappingURL=package.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,MAAM,EACX,WAAW,EACX,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,WAAW,EACX,eAAe,EAEhB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Organization } from '@_linked/schema/shapes/Organization';
2
+ import { Person } from '@_linked/schema/shapes/Person';
3
+ import { Thing } from '@_linked/schema/shapes/Thing';
4
+ import { ShapeSet } from '@_linked/core/collections/ShapeSet';
5
+ import { Role } from './Role.js';
6
+ export declare class Membership extends Thing {
7
+ static targetClass: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
8
+ get member(): Person;
9
+ get role(): Role;
10
+ get organization(): Organization;
11
+ }
12
+ declare module '@_linked/schema/shapes/Person' {
13
+ interface Person {
14
+ readonly memberships: ShapeSet<Membership>;
15
+ }
16
+ }
@@ -0,0 +1,73 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var _a, _b;
11
+ import { Organization } from '@_linked/schema/shapes/Organization';
12
+ import { Person } from '@_linked/schema/shapes/Person';
13
+ import { Thing } from '@_linked/schema/shapes/Thing';
14
+ import { shacl } from '@_linked/core/ontologies/shacl';
15
+ import { createPropertyShape, objectProperty } from '@_linked/core/shapes/SHACL';
16
+ import { org } from '../ontologies/org.js';
17
+ import { linkedShape } from '../package.js';
18
+ import { Role } from './Role.js';
19
+ let Membership = class Membership extends Thing {
20
+ get member() {
21
+ return undefined;
22
+ }
23
+ get role() {
24
+ return undefined;
25
+ }
26
+ get organization() {
27
+ return undefined;
28
+ }
29
+ };
30
+ Membership.targetClass = org.Membership;
31
+ __decorate([
32
+ objectProperty({
33
+ path: org.member,
34
+ shape: Person,
35
+ maxCount: 1,
36
+ }),
37
+ __metadata("design:type", typeof (_a = typeof Person !== "undefined" && Person) === "function" ? _a : Object),
38
+ __metadata("design:paramtypes", [])
39
+ ], Membership.prototype, "member", null);
40
+ __decorate([
41
+ objectProperty({
42
+ path: org.role,
43
+ shape: Role,
44
+ maxCount: 1,
45
+ }),
46
+ __metadata("design:type", Role),
47
+ __metadata("design:paramtypes", [])
48
+ ], Membership.prototype, "role", null);
49
+ __decorate([
50
+ objectProperty({
51
+ path: org.organization,
52
+ shape: Organization,
53
+ maxCount: 1,
54
+ }),
55
+ __metadata("design:type", typeof (_b = typeof Organization !== "undefined" && Organization) === "function" ? _b : Object),
56
+ __metadata("design:paramtypes", [])
57
+ ], Membership.prototype, "organization", null);
58
+ Membership = __decorate([
59
+ linkedShape
60
+ ], Membership);
61
+ export { Membership };
62
+ //Support person.memberships in queries
63
+ createPropertyShape({
64
+ path: org.hasMembership,
65
+ shape: Membership,
66
+ }, 'memberships', shacl.IRI, Person);
67
+ // A person → organization sequence path (org:hasMembership / org:organization) is now
68
+ // resolvable by core (plan-012), but Workspace-by-member queries use the inverse
69
+ // `Workspace.memberships` ({inv: org.organization}) instead, so no `Person.organizations`
70
+ // property is needed here. Add one if a forward person→orgs traversal is wanted:
71
+ // createPropertyShape({path: [org.hasMembership, org.organization], shape: Organization},
72
+ // 'organizations', shacl.IRI, Person);
73
+ //# sourceMappingURL=Membership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Membership.js","sourceRoot":"","sources":["../../../src/shapes/Membership.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1B,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,KAAK;IAGnC,IAKI,MAAM;QACR,OAAO,SAAgB,CAAC;IAC1B,CAAC;IAED,IAKI,IAAI;QACN,OAAO,SAAgB,CAAC;IAC1B,CAAC;IAED,IAKI,YAAY;QACd,OAAO,SAAgB,CAAC;IAC1B,CAAC;;AA3BM,sBAAW,GAAG,GAAG,CAAC,UAAU,AAAjB,CAAkB;AAEpC;IAAC,cAAc,CAAC;QACd,IAAI,EAAE,GAAG,CAAC,MAAM;QAChB,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,CAAC;KACZ,CAAC;kDACY,MAAM,oBAAN,MAAM;;wCAEnB;AAED;IAAC,cAAc,CAAC;QACd,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,CAAC;KACZ,CAAC;8BACU,IAAI;;sCAEf;AAED;IAAC,cAAc,CAAC;QACd,IAAI,EAAE,GAAG,CAAC,YAAY;QACtB,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,CAAC;KACZ,CAAC;kDACkB,YAAY,oBAAZ,YAAY;;8CAE/B;AA5BU,UAAU;IADtB,WAAW;GACC,UAAU,CA6BtB;;AAED,uCAAuC;AACvC,mBAAmB,CACjB;IACE,IAAI,EAAE,GAAG,CAAC,aAAa;IACvB,KAAK,EAAE,UAAU;CAClB,EACD,aAAa,EACb,KAAK,CAAC,GAAG,EACT,MAAM,CACP,CAAC;AAOF,sFAAsF;AACtF,iFAAiF;AACjF,0FAA0F;AAC1F,iFAAiF;AACjF,4FAA4F;AAC5F,2CAA2C"}
@@ -0,0 +1,4 @@
1
+ import { Thing } from '@_linked/schema/shapes/Thing';
2
+ export declare class Role extends Thing {
3
+ static targetClass: import("@_linked/core/utils/NodeReference").NodeReferenceValue;
4
+ }
@@ -0,0 +1,17 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { linkedShape } from '../package.js';
8
+ import { org } from '../ontologies/org.js';
9
+ import { Thing } from '@_linked/schema/shapes/Thing';
10
+ let Role = class Role extends Thing {
11
+ };
12
+ Role.targetClass = org.Role;
13
+ Role = __decorate([
14
+ linkedShape
15
+ ], Role);
16
+ export { Role };
17
+ //# sourceMappingURL=Role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Role.js","sourceRoot":"","sources":["../../../src/shapes/Role.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAG9C,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,KAAK;;AACtB,gBAAW,GAAG,GAAG,CAAC,IAAI,AAAX,CAAY;AADnB,IAAI;IADhB,WAAW;GACC,IAAI,CAEhB"}
@@ -0,0 +1,12 @@
1
+ declare module '*.module.css' {
2
+ const classes: {
3
+ [key: string]: string;
4
+ };
5
+ export default classes;
6
+ }
7
+ declare module '*.module.scss' {
8
+ const classes: {
9
+ [key: string]: string;
10
+ };
11
+ export default classes;
12
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -8,18 +8,20 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": ""
11
+ "url": "git+https://github.com/linked-fw/org.git"
12
12
  },
13
- "version": "1.0.2",
13
+ "version": "1.1.1",
14
+ "packageManager": "npm@11.19.1",
14
15
  "linkedPackage": true,
15
- "main": "lib/index.js",
16
- "types": "dist/lincd-org.d.ts",
16
+ "type": "module",
17
+ "main": "lib/esm/index.js",
18
+ "types": "./lib/esm/index.d.ts",
17
19
  "license": "ISC",
18
20
  "scripts": {
19
21
  "start": "npm exec linked dev",
20
- "build": "npm exec linked build",
21
- "prepublishOnly": "npm exec linked build production",
22
- "postpublish": "npm exec linked register"
22
+ "build": "rimraf ./lib && npm run build-esm && npm run copy-to-lib",
23
+ "build-esm": "echo \"compiling ESM\" && rimraf ./lib/esm && (tsc -p tsconfig-esm.json || echo 'tsc returned non-zero; .js still emitted via noEmitOnError default')",
24
+ "copy-to-lib": "echo 'copying JSON assets to lib folder' && copyfiles -u 1 'src/**/*.json' lib/esm"
23
25
  },
24
26
  "keywords": [
25
27
  "lincd",
@@ -32,18 +34,15 @@
32
34
  "exports": {
33
35
  ".": {
34
36
  "types": "./lib/esm/index.d.ts",
35
- "import": "./lib/esm/index.js",
36
- "require": "./lib/cjs/index.js"
37
+ "import": "./lib/esm/index.js"
37
38
  },
38
39
  "./*.js": {
39
40
  "types": "./lib/esm/*.d.ts",
40
- "import": "./lib/esm/*.js",
41
- "require": "./lib/cjs/*.js"
41
+ "import": "./lib/esm/*.js"
42
42
  },
43
43
  "./*": {
44
44
  "types": "./lib/esm/*.d.ts",
45
- "import": "./lib/esm/*.js",
46
- "require": "./lib/cjs/*.js"
45
+ "import": "./lib/esm/*.js"
47
46
  }
48
47
  },
49
48
  "typesVersions": {
@@ -54,14 +53,16 @@
54
53
  }
55
54
  },
56
55
  "dependencies": {
57
- "@_linked/core": "*",
58
- "@_linked/schema": "*"
56
+ "@_linked/core": "^2.0.1",
57
+ "@_linked/schema": "^1.0"
59
58
  },
60
59
  "devDependencies": {
61
60
  "@_linked/cli": "^1.2",
62
61
  "@changesets/changelog-github": "^0.5.2",
63
62
  "@changesets/cli": "^2.29.8",
64
63
  "@types/node": "^22.13.14",
64
+ "copyfiles": "^2.4.1",
65
+ "rimraf": "^5.0.7",
65
66
  "tsconfig-to-dual-package": "^1.2.0",
66
67
  "typescript": "5.7.3"
67
68
  },
package/tsconfig-esm.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "module": "esnext",
5
5
  "target": "es2018",
6
6
  "outDir": "lib/esm",
7
- "moduleResolution": "node"
7
+ "moduleResolution": "bundler"
8
8
  }
9
9
  }
@@ -1,44 +0,0 @@
1
- name: Changeset Check
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- changeset-check:
10
- name: Check for changeset
11
- # Skip the check on the automated Release PR.
12
- if: ${{ github.head_ref != 'changeset-release/main' }}
13
- runs-on: ubuntu-latest
14
- steps:
15
- - name: Checkout
16
- uses: actions/checkout@v4
17
- with:
18
- fetch-depth: 0
19
-
20
- - name: Check for changeset files
21
- uses: actions/github-script@v7
22
- with:
23
- script: |
24
- const { data: files } = await github.rest.pulls.listFiles({
25
- owner: context.repo.owner,
26
- repo: context.repo.repo,
27
- pull_number: context.issue.number,
28
- });
29
-
30
- const hasChangeset = files.some(f =>
31
- f.filename.startsWith('.changeset/') &&
32
- f.filename.endsWith('.md') &&
33
- f.filename !== '.changeset/README.md'
34
- );
35
-
36
- if (!hasChangeset) {
37
- await github.rest.issues.createComment({
38
- owner: context.repo.owner,
39
- repo: context.repo.repo,
40
- issue_number: context.issue.number,
41
- body: "No changeset found. If this PR should trigger a release, run `npx changeset` and commit the generated file.\n\nIf this change doesn't need a release (docs, CI config, etc.), you can ignore this message."
42
- });
43
- core.warning('No changeset file found in this PR.');
44
- }
@@ -1,43 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- build-and-test:
10
- name: Build & Test
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Detect Release PR
14
- id: rpr
15
- run: |
16
- if [[ "${{ github.event.pull_request.head.ref }}" == "changeset-release/main" ]]; then
17
- echo "is_release_pr=true" >> $GITHUB_OUTPUT
18
- echo "Release PR from changesets/action detected — skipping build/test (auto-generated version+CHANGELOG only)."
19
- else
20
- echo "is_release_pr=false" >> $GITHUB_OUTPUT
21
- fi
22
-
23
- - name: Checkout
24
- if: steps.rpr.outputs.is_release_pr == 'false'
25
- uses: actions/checkout@v4
26
-
27
- - name: Setup Node.js
28
- if: steps.rpr.outputs.is_release_pr == 'false'
29
- uses: actions/setup-node@v4
30
- with:
31
- node-version: 22.16.0
32
-
33
- - name: Install dependencies
34
- if: steps.rpr.outputs.is_release_pr == 'false'
35
- run: npm ci --legacy-peer-deps
36
-
37
- - name: Build
38
- if: steps.rpr.outputs.is_release_pr == 'false'
39
- run: npm run build
40
-
41
- - name: Test
42
- if: steps.rpr.outputs.is_release_pr == 'false'
43
- run: npm test --if-present