Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

### Others

- utils: v4.10.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/utils/utils/CHANGELOG.md))
- utils: v5.0.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/utils/utils/CHANGELOG.md))

<a name="5.2.0"></a>

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions providers/ic/src/canisters/manager/manager.did
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
type UserId__1 = principal;
type UserId = principal;
type BucketId = principal;
type Bucket =
Expand All @@ -13,6 +12,6 @@ service : {
getStorage: () -> (opt Bucket) query;
initData: () -> (Bucket);
initStorage: () -> (Bucket);
installCode: (principal, UserId__1, blob) -> ();
installCode: (principal, blob, blob) -> ();
list: (text) -> (vec Bucket) query;
}
3 changes: 1 addition & 2 deletions providers/ic/src/canisters/manager/manager.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ export interface Bucket {
}
export type BucketId = Principal;
export type UserId = Principal;
export type UserId__1 = Principal;
export interface _SERVICE {
delData: () => Promise<boolean>;
delStorage: () => Promise<boolean>;
getData: () => Promise<[] | [Bucket]>;
getStorage: () => Promise<[] | [Bucket]>;
initData: () => Promise<Bucket>;
initStorage: () => Promise<Bucket>;
installCode: (arg_0: Principal, arg_1: UserId__1, arg_2: Array<number>) => Promise<undefined>;
installCode: (arg_0: Principal, arg_1: Array<number>, arg_2: Array<number>) => Promise<undefined>;
list: (arg_0: string) => Promise<Array<Bucket>>;
}
3 changes: 1 addition & 2 deletions providers/ic/src/canisters/manager/manager.utils.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ export const idlFactory = ({IDL}) => {
owner: UserId,
bucketId: IDL.Opt(BucketId)
});
const UserId__1 = IDL.Principal;
return IDL.Service({
delData: IDL.Func([], [IDL.Bool], []),
delStorage: IDL.Func([], [IDL.Bool], []),
getData: IDL.Func([], [IDL.Opt(Bucket)], ['query']),
getStorage: IDL.Func([], [IDL.Opt(Bucket)], ['query']),
initData: IDL.Func([], [Bucket], []),
initStorage: IDL.Func([], [Bucket], []),
installCode: IDL.Func([IDL.Principal, UserId__1, IDL.Vec(IDL.Nat8)], [], []),
installCode: IDL.Func([IDL.Principal, IDL.Vec(IDL.Nat8), IDL.Vec(IDL.Nat8)], [], []),
list: IDL.Func([IDL.Text], [IDL.Vec(Bucket)], ['query'])
});
};
Expand Down
7 changes: 7 additions & 0 deletions utils/utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 5.0.0 (2022-01-08)

### Build

- output esm chunks
- re-organize bundle structure in separate folders

# 4.0.0 (2022-01-08)

### Build
Expand Down
20 changes: 17 additions & 3 deletions utils/utils/esbuild.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
const esbuild = require('esbuild');
const {readdirSync, existsSync, mkdirSync, writeFileSync} = require('fs');
const {join} = require('path');

const lib = join(process.cwd(), 'lib');

if (!existsSync(lib)) {
mkdirSync(lib);
}

const entryPoints = readdirSync(join(process.cwd(), 'src')).map((file) => `src/${file}`);

esbuild
.build({
entryPoints: ['src/index.ts'],
outdir: 'lib',
entryPoints,
outdir: 'lib/esm',
bundle: true,
sourcemap: true,
minify: true,
Expand All @@ -16,11 +26,15 @@ esbuild
esbuild
.build({
entryPoints: ['src/index.ts'],
outfile: 'lib/index.cjs.js',
outfile: 'lib/cjs/index.cjs.js',
bundle: true,
sourcemap: true,
minify: true,
platform: 'node',
target: ['node16']
})
.catch(() => process.exit(1));

writeFileSync(join(lib, 'index.js'), "export * from './esm/index.js';");

writeFileSync(join(lib, 'index.cjs.js'), "module.exports = require('./cjs/index.cjs.js');");
10 changes: 5 additions & 5 deletions utils/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deckdeckgo/utils",
"version": "4.0.0",
"version": "5.0.0",
"author": "David Dal Busco",
"description": "A collection of utils methods and functions developed for DeckDeckGo",
"license": "MIT",
Expand All @@ -13,11 +13,11 @@
"devDependencies": {
"@types/node": "^16.9.0"
},
"main": "lib/index.cjs.js",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/cjs/index.cjs.js",
"module": "lib/esm/index.js",
"types": "lib/types/index.d.ts",
"scripts": {
"ts-declaration": " tsc --emitDeclarationOnly --outDir lib",
"ts-declaration": " tsc --emitDeclarationOnly --outDir lib/types",
"build": "rimraf lib && node ./esbuild.js && npm run ts-declaration"
},
"files": [
Expand Down
12 changes: 6 additions & 6 deletions utils/utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './utils/utils';
export * from './utils/image.utils';
export * from './utils/inject.utils';
export * from './utils/color.utils';
export * from './utils/selection.utils';
export * from './utils/editable.utils';
export * from './utils';
export * from './image.utils';
export * from './inject.utils';
export * from './color.utils';
export * from './selection.utils';
export * from './editable.utils';
File renamed without changes.