mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-16 10:47:01 +00:00
package server with client
This commit is contained in:
24
client/permissions-plugin.ts
Normal file
24
client/permissions-plugin.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import chmodr from 'chmodr'
|
||||
import * as path from 'path'
|
||||
|
||||
interface PluginOptions {
|
||||
resourcePath: string
|
||||
}
|
||||
|
||||
class PermissionsPlugin {
|
||||
options: PluginOptions
|
||||
|
||||
constructor(options: PluginOptions) {
|
||||
this.options = options
|
||||
}
|
||||
|
||||
apply(compiler: any) {
|
||||
compiler.hooks.afterEmit.tap('PermissionsPlugin', () => {
|
||||
chmodr(path.join(this.options.resourcePath), 0o755, err => {
|
||||
// this fails on the first call to suppress the error
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default PermissionsPlugin
|
||||
Reference in New Issue
Block a user