-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
420 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@premieroctet/next-admin": patch | ||
--- | ||
|
||
Fix in/notin operators in advanced filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import * as esbuild from 'esbuild'; | ||
import { buildOptions } from './options'; | ||
import * as esbuild from "esbuild"; | ||
import { buildOptions } from "./options"; | ||
|
||
const build = async () => { | ||
await esbuild.build({ | ||
...buildOptions | ||
}) | ||
} | ||
...buildOptions, | ||
}); | ||
}; | ||
|
||
build() | ||
build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import * as esbuild from 'esbuild'; | ||
import { buildOptions } from './options'; | ||
import * as esbuild from "esbuild"; | ||
import { buildOptions } from "./options"; | ||
|
||
const dev = async () => { | ||
const ctx = await esbuild.context({ | ||
...buildOptions | ||
}) | ||
...buildOptions, | ||
}); | ||
|
||
await ctx.watch() | ||
} | ||
await ctx.watch(); | ||
}; | ||
|
||
dev() | ||
dev(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import type * as esbuild from 'esbuild'; | ||
import fs from 'fs' | ||
import type * as esbuild from "esbuild"; | ||
import fs from "fs"; | ||
|
||
const plugin: esbuild.Plugin = { | ||
name: 'cliPlugin', | ||
name: "cliPlugin", | ||
setup(build) { | ||
build.onEnd(() => { | ||
fs.chmodSync('dist/index.js', '755'); | ||
fs.chmodSync("dist/index.js", "755"); | ||
|
||
fs.cpSync("src/templates", "dist/templates", { recursive: true }); | ||
}) | ||
}); | ||
}, | ||
} | ||
}; | ||
|
||
export const buildOptions: esbuild.BuildOptions = { | ||
entryPoints: ['src/index.ts'], | ||
entryPoints: ["src/index.ts"], | ||
bundle: true, | ||
platform: 'node', | ||
platform: "node", | ||
minify: true, | ||
plugins: [plugin], | ||
outfile: 'dist/index.js', | ||
external: ['fs', 'path'], | ||
outfile: "dist/index.js", | ||
external: ["fs", "path"], | ||
banner: { | ||
js: '#!/usr/bin/env node', | ||
js: "#!/usr/bin/env node", | ||
}, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import path from 'path'; | ||
import path from "path"; | ||
|
||
export const getRelativePath = (from: string, to: string) => { | ||
return path.join( | ||
path.relative( | ||
path.dirname(from), | ||
path.dirname(to) | ||
), | ||
path.relative(path.dirname(from), path.dirname(to)), | ||
path.basename(to) | ||
) | ||
} | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import path from 'path' | ||
import fs from 'fs' | ||
import Mustache from 'mustache' | ||
import path from "path"; | ||
import fs from "fs"; | ||
import Mustache from "mustache"; | ||
|
||
export const writeToTemplate = ( | ||
templateName: string, | ||
context: Record<string, string | boolean> | ||
) => { | ||
const template = fs.readFileSync( | ||
path.join( | ||
__dirname, | ||
'templates', | ||
`${templateName}.mustache` | ||
), | ||
'utf-8' | ||
) | ||
|
||
path.join(__dirname, "templates", `${templateName}.mustache`), | ||
"utf-8" | ||
); | ||
|
||
return Mustache.render(template, context, undefined, { | ||
escape: (value) => value | ||
}) | ||
escape: (value) => value, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/next-admin/src/components/advancedSearch/AdvancedSearchContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.