Skip to content

Commit

Permalink
fix: polyfill previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLfulus committed Jun 7, 2024
1 parent e22c7f4 commit 10d1c90
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @indirectus/cli

## 1.0.2

### Patch Changes

- fix: make it backwards compatible

## 1.0.1

### Patch Changes
Expand Down
17 changes: 15 additions & 2 deletions packages/cli/default/templates/default/client.ts.njk
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ export function read{{ collectionName }}<
return DirectusSDK.readSingleton<Schema, {{ collectionString }}, Query>("{{ collection.name }}", query);
}

/**
* Reads the {{ collection.name | to_collection_text }} singleton.
*/
export const get{{ collectionName }} = read{{ collectionName }};

{% else %}

/**
Expand Down Expand Up @@ -239,6 +244,11 @@ export function read{{ collectionName }}Items<
return DirectusSDK.readItems<Schema, {{ collectionString }}, Query>("{{ collection.name }}", query);
}

/**
* Read many {{ collection.name | to_collection_text }} items.
*/
export const list{{ collectionName }} = read{{ collectionName }}Items;

/**
* Gets a single known {{ collection.name | to_collection_text }} item by id.
*/
Expand All @@ -248,6 +258,11 @@ export function read{{ collectionName }}Item<
return DirectusSDK.readItem<Schema, {{ collectionString }}, Query>("{{ collection.name }}", key, query);
}

/**
* Gets a single known {{ collection.name | to_collection_text }} item by id.
*/
export const read{{ collectionName }} = read{{ collectionName }}Item;

/**
* Read many {{ collection.name | to_collection_text }} items.
*/
Expand All @@ -266,8 +281,6 @@ export function update{{ collectionName }}Item<
return DirectusSDK.updateItem<Schema, {{ collectionString }}, Query>("{{ collection.name }}", key, patch, query);
}



/**
* Deletes many {{ collection.name | to_collection_text }} items.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@indirectus/cli",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"description": "Directus Tools CLI.",
"keywords": [
Expand Down
8 changes: 8 additions & 0 deletions packages/indirectus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# indirectus

## 1.0.2

### Patch Changes

- fix: make it backwards compatible
- Updated dependencies
- @indirectus/cli@1.0.2

## 1.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/indirectus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indirectus",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"description": "Directus Tools CLI.",
"keywords": [
Expand Down

0 comments on commit 10d1c90

Please sign in to comment.